1 # class http\Params implements ArrayAccess
3 Parse, interpret and compose HTTP (header) parameters.
9 2.1.0 | Added [RFC5987](http://tools.ietf.org/html/rfc5987) support
10 2.5.0 | Added [RFC5988](http://tools.ietf.org/html/rfc5987) support
19 $t = "p1*=utf-8'de's$u$s,p2*=utf-8''hei$s;a1*=utf-8''a$s;a2*=utf-8''e$s;a3=no,p3=not";
20 $p = new http\Params($t);
22 var_dump($p->params, $p->toString());
75 string(98) "p1*=utf-8'de's%C3%BC%C3%9F,p2*=utf-8''hei%C3%9F;a1*=utf-8''a%C3%9F;a2*=utf-8''e%C3%9F;a3=no,p3=not"
77 ## Web Linking Example:
80 Link: </TheBook/chapter2>;
81 rel="previous"; title*=UTF-8'de'letztes%20Kapitel,
83 rel="next"; title*=UTF-8'de'n%c3%a4chstes%20Kapitel
86 $p = current(http\Header::parse($link, "http\\Header"))->getParams(
87 http\Params::DEF_PARAM_SEP,
88 http\Params::DEF_ARG_SEP,
89 http\Params::DEF_VAL_SEP,
90 http\Params::PARSE_RFC5988 | http\Params::PARSE_ESCAPED
99 ["/TheBook/chapter2"]=>
112 string(15) "letztes Kapitel"
117 ["/TheBook/chapter4"]=>
130 string(17) "nächstes Kapitel"
136 string(139) "</TheBook/chapter2>;rel="previous";title*=utf-8'de'letztes%20Kapitel,</TheBook/chapter4>;rel="next";title*=utf-8'de'n%C3%A4chstes%20Kapitel"
141 The default parameter separator (",").
143 The default argument separator (";").
145 The default value separator ("=").
147 Empty param separator to parse cookies.
149 Do not interpret the parsed parameters.
151 Interpret input as default formatted parameters.
153 Urldecode single units of parameters, arguments and values.
155 Parse sub dimensions indicated by square brackets.
157 Parse URL querystring (same as http\Params::PARSE_URLENCODED|http\Params::PARSE_DIMENSION).
159 Parse [RFC5987](http://tools.ietf.org/html/rfc5987) style encoded character set and language information embedded in HTTP header params.
161 Parse [RFC5988](http://tools.ietf.org/html/rfc5988) (Web Linking) tags of Link headers.
165 * public array $params = NULL
166 The (parsed) parameters.
167 * public array $param_sep = http\Params::DEF_PARAM_SEP
168 The parameter separator(s).
169 * public array $arg_sep = http\Params::DEF_ARG_SEP
170 The argument separator(s).
171 * public array $val_sep = http\Params::DEF_VAL_SEP
172 The value separator(s).
173 * public int $flags = http\Params::PARSE_DEFAULT
174 The modus operandi of the parser. See http\Params::PARSE_* constants.