ContentNegociator
class ContentNegociator (View source)
Traits
SingletonTrait
Constants
| STRICT |
String mode negociation flags. Always honor the Accept[-*] header and raise ContentNegociationException even if the receommanded behavior is to ignore the header on negociation failure. Applies to
|
| ALL_MATCH |
Negociation flag. Negociation methods will return an array containing all available entries that fullfil the Accept[-*] header conditions instead of returning the best match only. |
Methods
array
negociate(RequestInterface $request, $availables = array(), $flags = 0)
No description
ResponseInterface
populateResponse(ResponseInterface $response, array $negociatied, array $availables = null)
No description
MediaTypeInterface
negociateContentType($accepted, $available, $flags = 0)
No description
string|mixed|array|unknown[]|Iterator[]|mixed[]|NULL[]|array[]|ArrayAccess[]|ContainerInterface[]|Traversable[]
negociateEncoding($accepted, $available, $flags = 0)
No description
negociateCharset($accepted, $available, $flags = 0)
No description
mixed
negociateLanguage($accepted, $available, $flags = 0)
No description
number
getContentTypeQualityValue(MediaTypeInterface $contentType, Traversable $acceptedMediaRanges)
Compute the quality value of the given media type against a list of accepted media ranges.
MediaTypeInterface
normalizeMediaType(mixed $input)
No description
appendCharset($entry, $charset)
No description
Details
at line 68
array
negociate(RequestInterface $request, $availables = array(), $flags = 0)
at line 191
ResponseInterface
populateResponse(ResponseInterface $response, array $negociatied, array $availables = null)
at line 239
MediaTypeInterface
negociateContentType($accepted, $available, $flags = 0)
at line 300
string|mixed|array|unknown[]|Iterator[]|mixed[]|NULL[]|array[]|ArrayAccess[]|ContainerInterface[]|Traversable[]
negociateEncoding($accepted, $available, $flags = 0)
at line 393
negociateCharset($accepted, $available, $flags = 0)
at line 520
mixed
negociateLanguage($accepted, $available, $flags = 0)
at line 621
number
getContentTypeQualityValue(MediaTypeInterface $contentType, Traversable $acceptedMediaRanges)
Compute the quality value of the given media type against a list of accepted media ranges.