PHP Interface Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface

Show file Open project: neomerx/json-api Interface Usage Examples

Public Methods

Method Description
equalsTo ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean Compare media types.
getMediaType ( ) : string Get full media type (type/subtype).
getParameters ( ) : string>\arraynull Get media type parameters.
getSubType ( ) : string Get media subtype.
getType ( ) : string Get media type (no subtype).
matchesTo ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean Compare media types.

Method Details

equalsTo() public method

Compare media types.
public equalsTo ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean
$mediaType Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface
return boolean

getMediaType() public method

Get full media type (type/subtype).
public getMediaType ( ) : string
return string

getParameters() public method

Get media type parameters.
public getParameters ( ) : string>\arraynull
return string>\arraynull

getSubType() public method

Get media subtype.
public getSubType ( ) : string
return string

getType() public method

Get media type (no subtype).
public getType ( ) : string
return string

matchesTo() public method

Compare media types.
public matchesTo ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean
$mediaType Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface
return boolean