MediaTypeInterface
interface MediaTypeInterface implements ParameterMapProviderInterface, StringRepresentation, JsonSerializable (View source)
Media Type / Media Range interface
- String representation must return the Media Type/Range without parameters
- Serialized form MUST return the media type / range followed by a semicolon-separated list of parameters media-type = type "/" sub-type serialized = media-type 0*(";" parameter) parameter = token "=" ( token / quoted )
Constants
| ANY |
Wildcard type or subtype |
Methods
true
match(MediaTypeInterface|string $mediaRange)
Check if the MediaType instance match the given MediaRange
string
getType()
Get media type main type
MediaSubType|string
getSubType()
Get media type sub type and optional structured syntax suffix
string|array|string|NULL
getStructuredSyntax(boolean $registeredOnly = false)
Get the subtype structured syntax name if any.
Details
at line 45
true
match(MediaTypeInterface|string $mediaRange)
Check if the MediaType instance match the given MediaRange
at line 54
string
getType()
Get media type main type
Any RFC 6838 restricted name token or the wildcard token "*"
at line 68
MediaSubType|string
getSubType()
Get media type sub type and optional structured syntax suffix
Any of the following
- A RFC 6838 restricted name token, optionnaly followed by a "+" and a structured syntax suffix
- The wildcard token.
at line 80
string|array|string|NULL
getStructuredSyntax(boolean $registeredOnly = false)
Get the subtype structured syntax name if any.