RequestMediaTypeParser
class RequestMediaTypeParser (View source)
Constants
OWS_CHARS |
Optional white space characters. |
PARAMETER_SEPARATOR_CHAR |
Parameter-separator character. |
LIST_SEPARATOR_CHAR |
List-separator character. |
RX_TOKEN |
Regular expression chunk: token. |
RX_QUOTED_STRING |
Regular expression chunk: quoted string. |
RX_TYPE |
Regular expression chunk: type. |
RX_SUBTYPE |
Regular expression chunk: sub-type. |
Properties
protected Request | $request | ||
private array|null | $requestAcceptMap |
Methods
Check if the client signaled that it supports a media type.
Get the data associated to a media type.
Get the data extracted from the 'Accept' header.
Get the 'Accept' header of the request.
No description
No description
No description
No description
No description
No description
Details
__construct(Request $request)
Initialize the instance.
bool
isMediaTypeSupported(string|string[] $mediaType, float|null $minWeight = null)
Check if the client signaled that it supports a media type.
array
getMediaTypeData(string|string[] $mediaType)
Get the data associated to a media type.
array
getRequestAcceptMap()
Get the data extracted from the 'Accept' header.
protected
getRequestAccept()
Get the 'Accept' header of the request.
protected array
parseRequestAccept(string $accept)
No description
protected array
sortRequestAcceptMap(array $requestAcceptMap)
No description
protected string
getTypeSubtypeRegularExpression()
No description
protected string
getParameterAndValueRegularExpression()
No description
protected string[]
normalizeMediaType(string|string[] $mediaType)
No description
protected string[]
getMediaTypeAlternatives(string $type, string $subType)
No description