PHP Class Neomerx\JsonApi\Http\Headers\Header

Inheritance: implements Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface
Datei anzeigen Open project: neomerx/json-api Class Usage Examples

Public Methods

Method Description
__construct ( string $name, Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface[] $mediaTypes )
getMediaTypes ( )
getName ( )
parse ( string $header, string $name ) : Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface Parse header.

Protected Methods

Method Description
newInstance ( string $name, Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface[] $mediaTypes ) : Header
parseMediaType ( integer $position, string $mediaType ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface

Method Details

__construct() public method

public __construct ( string $name, Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface[] $mediaTypes )
$name string
$mediaTypes Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface[]

getMediaTypes() public method

public getMediaTypes ( )

getName() public method

public getName ( )

newInstance() protected static method

protected static newInstance ( string $name, Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface[] $mediaTypes ) : Header
$name string
$mediaTypes Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface[]
return Header

parse() public static method

Parse header.
public static parse ( string $header, string $name ) : Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface
$header string
$name string
return Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface

parseMediaType() protected static method

protected static parseMediaType ( integer $position, string $mediaType ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface
$position integer
$mediaType string
return Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface