Params
class Params implements ArrayAccess (View source)
Parse, interpret and compose HTTP (header) parameters.
Constants
DEF_PARAM_SEP |
The default parameter separator (","). |
DEF_ARG_SEP |
The default argument separator (";"). |
DEF_VAL_SEP |
The default value separator ("="). |
COOKIE_PARAM_SEP |
Empty param separator to parse cookies. |
PARSE_RAW |
Do not interpret the parsed parameters. |
PARSE_DEFAULT |
Interpret input as default formatted parameters. |
PARSE_ESCAPED |
Parse backslash escaped (quoted) strings. |
PARSE_URLENCODED |
Urldecode single units of parameters, arguments and values. |
PARSE_DIMENSION |
Parse sub dimensions indicated by square brackets. |
PARSE_QUERY |
Parse URL querystring (same as http\Params::PARSE_URLENCODED|http\Params::PARSE_DIMENSION). |
PARSE_RFC5987 |
Parse RFC5987 style encoded character set and language information embedded in HTTP header params. |
PARSE_RFC5988 |
Parse RFC5988 (Web Linking) tags of Link headers. |
Properties
array | $params | The (parsed) parameters. |
|
array | $param_sep | The parameter separator(s). |
|
array | $arg_sep | The argument separator(s). |
|
array | $val_sep | The value separator(s). |
|
int | $flags | The modus operandi of the parser. See http\Params::PARSE_* constants. |
Methods
Instantiate a new HTTP (header) parameter set.
String cast handler. Alias of http\Params::toString().
Implements ArrayAccess.
Implements ArrayAccess.
Implements ArrayAccess.
Implements ArrayAccess.
Convenience method that simply returns http\Params::$params.
Returns a stringified version of the parameters.
Details
__construct(mixed $params = null, mixed $ps = null, mixed $as = null, mixed $vs = null, int $flags = null)
Instantiate a new HTTP (header) parameter set.
string
__toString()
String cast handler. Alias of http\Params::toString().
Returns a stringified version of the parameters.
bool
offsetExists(string $name)
Implements ArrayAccess.
mixed
offsetGet(string $name)
Implements ArrayAccess.
void
offsetSet(string $name, TValue $value)
Implements ArrayAccess.
void
offsetUnset(string $name)
Implements ArrayAccess.
array
toArray()
Convenience method that simply returns http\Params::$params.
string
toString()
Returns a stringified version of the parameters.