PHP Class Neomerx\JsonApi\Http\Headers\MediaType

Inheritance: implements Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface
Exibir arquivo Open project: neomerx/json-api Class Usage Examples

Protected Properties

Property Type Description
$ciParams array A list of parameter names for case-insensitive compare. Keys must be lower-cased.

Public Methods

Method Description
__construct ( string $type, string $subType, array $parameters = null )
equalsTo ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType )
getMediaType ( )
getParameters ( )
getSubType ( )
getType ( )
matchesTo ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType )
parse ( integer $position, string $mediaType ) : MediaType Parse media type.

Private Methods

Method Description
bothMediaTypeParamsEmpty ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean
bothMediaTypeParamsNotEmptyAndEqualInSize ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean
isMediaParametersEqual ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean
isParamCaseInsensitive ( string $name ) : boolean
isSubTypeEquals ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean
isSubTypeMatches ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean
isTypeEquals ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean
isTypeMatches ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType ) : boolean
paramValuesEqual ( string $name, string $value, string $valueToCompare ) : boolean

Method Details

__construct() public method

public __construct ( string $type, string $subType, array $parameters = null )
$type string
$subType string
$parameters array

equalsTo() public method

public equalsTo ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType )
$mediaType Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface

getMediaType() public method

public getMediaType ( )

getParameters() public method

public getParameters ( )

getSubType() public method

public getSubType ( )

getType() public method

public getType ( )

matchesTo() public method

public matchesTo ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType )
$mediaType Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface

parse() public static method

Parse media type.
public static parse ( integer $position, string $mediaType ) : MediaType
$position integer
$mediaType string
return MediaType

Property Details

$ciParams protected_oe property

A list of parameter names for case-insensitive compare. Keys must be lower-cased.
protected array $ciParams
return array