ICanBoogie/HTTP v2.6.0
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Exception
    • HTTP
      • Headers
      • Request
      • RequestDispatcher

Classes

  • CacheControl
  • ContentDisposition
  • ContentType
  • Date
  • Header
  • HeaderParameter

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( )
protected
# get_charset( )
public static ICanBoogie\HTTP\Headers\HeaderParameter
# from( mixed $source )

Creates a ICanBoogie\HTTP\Headers\HeaderParameter instance from the provided source.

Creates a ICanBoogie\HTTP\Headers\HeaderParameter instance from the provided source.

Parameters

$source

Returns

ICanBoogie\HTTP\Headers\HeaderParameter
public static boolean
# is_token( string $str )

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

$str

Returns

boolean
true if the provided string is a token, false otherwise.
public static string
# to_ascii( string $str )

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 )

Initializes the ICanBoogie\HTTP\Headers\HeaderParameter::$attribute, ICanBoogie\HTTP\Headers\HeaderParameter::$value and ICanBoogie\HTTP\Headers\HeaderParameter::$language properties.

Initializes the ICanBoogie\HTTP\Headers\HeaderParameter::$attribute, ICanBoogie\HTTP\Headers\HeaderParameter::$value and ICanBoogie\HTTP\Headers\HeaderParameter::$language properties.

Parameters

$attribute
$value
$language
public string
# render( )

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 string
# __toString( )

Returns the value of the parameter.

Returns the value of the parameter.

Note: ICanBoogie\HTTP\Headers\HeaderParameter::render() to render the attribute and value of the parameter.

Returns

string

Properties summary

protected string $attribute

Token of the parameter.

Token of the parameter.

#
public string $value

Value of the parameter.

Value of the parameter.

#
public string $language

Language of the value.

Language of the value.

#

Magic properties

public read-only string $attribute

The attribute of the parameter.

public read-only string $charset

The charset of the parameter's value.

ICanBoogie/HTTP v2.6.0 API documentation generated by ApiGen