MediaType
class MediaType implements MediaTypeInterface (View source)
Traits
Default implementation of the MediaTypeInterface::match() method
ParameterMapProviderTrait
Methods
string|NULL
getStructuredSyntax(boolean $registeredOnly = false)
No description
static string
static MediaTypeInterface
unserializeMediaTypeInterfaceInterface(string $className, string $pattern, string $mediaTypeString, boolean $withParameters)
No description
static
isMediaTypeMatchMediaRange($mediaType, $mediaRange)
No description
string
getType()
No description
MediaSubType|string
getSubType()
No description
string
__toString()
Short string representation
__clone()
No description
true
match(MediaTypeInterface|string $mediaRange)
Check if the MediaType instance match the given MediaRange
static MediaType
createFromString(string $mediaTypeString, boolean $withParameters = false)
No description
Details
string|NULL
getStructuredSyntax(boolean $registeredOnly = false)
protected
setParameters($parameters)
jsonSerialize()
string
serializeToString()
static string
serializeMediaTypeInterfaceToString(MediaTypeInterface $mediaType)
static MediaTypeInterface
unserializeMediaTypeInterfaceInterface(string $className, string $pattern, string $mediaTypeString, boolean $withParameters)
serialize()
unserialize($serialized)
static protected
isMediaTypeMatchMediaRange($mediaType, $mediaRange)
in MediaTypeCompareTrait at line 30
compare(MediaTypeInterface|MediaSubType|string $b)
Compare media range precision
static
matchStructuredSyntax($a, $b)
at line 36
string
getType()
at line 45
MediaSubType|string
getSubType()
at line 57
__construct(string $type, MediaSubType $subType = null)
at line 68
string
__toString()
Short string representation
at line 73
__clone()
at line 84
true
match(MediaTypeInterface|string $mediaRange)
Check if the MediaType instance match the given MediaRange