Class HeaderParameter
Representation of a header parameter.
-
ICanBoogie\HTTP\Headers\HeaderParameter
uses
ICanBoogie\Accessor\AccessorTrait (not available)
Namespace: ICanBoogie\
HTTP\
Headers
See:
http://tools.ietf.org/html/rfc2231
See:
http://tools.ietf.org/html/rfc5987
See:
http://greenbytes.de/tech/tc2231/#attwithfn2231utf8
Located at Headers/HeaderParameter.php
Methods summary
protected
get_attribute( void )
protected
get_charset( void )
public static
is_token( string $str
)
: boolean
Checks if the provided string is a token.
Checks if the provided string is a token.
token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
CHAR = <any US-ASCII character (octets 0 - 127)>
CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
SP = <US-ASCII SP, space (32)>
HT = <US-ASCII HT, horizontal-tab (9)>
Parameters
Returns
boolean
true
if the provided string is a token, false
otherwise.
public static
to_ascii( string $str
)
: string
Converts a string to the ASCI charset.
Converts a string to the ASCI charset.
Accents are converted using \ICanBoogie\remove_accents(). Characters that are not
in the ASCII range are discarted.
Parameters
$str
- The string to convert.
Returns
string
public
__construct( string $attribute
, string $value
= null, string|null $language
= null )
public
render( void )
: string
Renders the attribute and value into a string.
Renders the attribute and value into a string.
A string of text is parsed as a single word if it is quoted using
double-quote marks.
quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
qdtext = <any TEXT except <">>
The backslash character ("\") MAY be used as a single-character
quoting mechanism only within quoted-string and comment constructs.
quoted-pair = "\" CHAR
Returns
string
public
__toString( void )
: string
Returns the value of the parameter.
Properties summary
protected
$attribute
: string
public
$language
: string
Magic properties
public read-only
$attribute
: string
The attribute of the parameter.
public read-only
$charset
: string
The charset of the parameter's value.