MediaWiki
1.30.0
|
Utility for negotiating a value from a set of supported values using a preference list. More...
Classes | |
class | HttpAcceptNegotiator |
class | HttpAcceptParser |
Utility for negotiating a value from a set of supported values using a preference list.
Utility for parsing a HTTP Accept header value into a weight map.
This is intended for use with HTTP headers like Accept, Accept-Language, Accept-Encoding, etc. See RFC 2616 section 14 for details.
To use this with a request header, first parse the header value into an array of weights using HttpAcceptParser, then call getBestSupportedKey.
May also be used with other, similar headers like Accept-Language, Accept-Encoding, etc.