MediaWiki
1.34.0
|
Public Member Functions | |
parseWeights ( $rawHeader) | |
Parses an HTTP header into a weight map, that is an associative array mapping values to their respective weights. More... | |
Definition at line 13 of file HttpAcceptParser.php.
Wikimedia\Http\HttpAcceptParser::parseWeights | ( | $rawHeader | ) |
Parses an HTTP header into a weight map, that is an associative array mapping values to their respective weights.
Any header name preceding weight spec is ignored for convenience.
This implementation is partially based on the code at http://www.thefutureoftheweb.com/blog/use-accept-language-header
Note that type parameters and accept extension like the "level" parameter are not supported, weights are derived from "q" values only.
See HTTP/1.1 section 14 for details.
string | $rawHeader |
Definition at line 35 of file HttpAcceptParser.php.