class MediaTypeInspector (View source)

Provides informations about media type/range.

Traits

SingletonTrait
Default implementation of the MediaTypeInterface::match() method

Methods

static 
isMediaTypeMatchMediaRange($mediaType, $mediaRange)

No description

boolean
hasWildcard(MediaTypeInterface|string $input)

No description

boolean
isFullySpecifiedMediaType(MediaTypeInterface|string $input)

No description

boolean
matchMediaRange(MediaTypeInterface|string $mediaType, MediaTypeInterface|string $mediaRange)

No description

Details

static protected isMediaTypeMatchMediaRange($mediaType, $mediaRange)

Parameters

$mediaType
$mediaRange

boolean hasWildcard(MediaTypeInterface|string $input)

Parameters

MediaTypeInterface|string $input Media type/range

Return Value

boolean TRUE if input type or subtype value is the "*" wildcard character.

Exceptions

InvalidArgumentException

boolean isFullySpecifiedMediaType(MediaTypeInterface|string $input)

Parameters

MediaTypeInterface|string $input Media type or range

Return Value

boolean TRUE if both media type and subtype are valid RFC6838 restricted names.

boolean matchMediaRange(MediaTypeInterface|string $mediaType, MediaTypeInterface|string $mediaRange)

Parameters

MediaTypeInterface|string $mediaType Media type
MediaTypeInterface|string $mediaRange Media range

Return Value

boolean TRUE if $mediaType is compatible with $mediaRange