PHP Interface Neomerx\JsonApi\Contracts\Codec\CodecMatcherInterface

Exibir arquivo Open project: neomerx/json-api Interface Usage Examples

Public Methods

Method Description
getDecoder ( ) : Neomerx\JsonApi\Contracts\Decoder\DecoderInterface | null Get decoder.
getDecoderHeaderMatchedType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface | null Get media type from 'Content-Type' header that matched to one of the registered decoder media types.
getDecoderRegisteredMatchedType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface | null Get media type that was registered for matched decoder.
getEncoder ( ) : Neomerx\JsonApi\Contracts\Encoder\EncoderInterface | null Get encoder.
getEncoderHeaderMatchedType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\AcceptMediaTypeInterface | null Get media type from 'Accept' header that matched to one of the registered encoder media types.
getEncoderRegisteredMatchedType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface | null Get media type that was registered for matched encoder.
matchDecoder ( Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface $contentTypeHeader ) : void Find best decoder match for 'Content-Type' header.
matchEncoder ( Neomerx\JsonApi\Contracts\Http\Headers\AcceptHeaderInterface $acceptHeader ) : void Find best encoder match for 'Accept' header.
registerDecoder ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType, Closure $decoderClosure ) : void Register decoder.
registerEncoder ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType, Closure $encoderClosure ) : void Register encoder.
setDecoder ( Neomerx\JsonApi\Contracts\Decoder\DecoderInterface | Closur\Closure $decoder ) : Neomerx\JsonApi\Contracts\Decoder\DecoderInterface Set decoder.
setEncoder ( Neomerx\JsonApi\Contracts\Encoder\EncoderInterface | Closur\Closure $encoder ) : void Set encoder.

Method Details

getDecoder() public method

Get decoder.
public getDecoder ( ) : Neomerx\JsonApi\Contracts\Decoder\DecoderInterface | null
return Neomerx\JsonApi\Contracts\Decoder\DecoderInterface | null

getDecoderHeaderMatchedType() public method

Get media type from 'Content-Type' header that matched to one of the registered decoder media types.
public getDecoderHeaderMatchedType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface | null
return Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface | null

getDecoderRegisteredMatchedType() public method

Get media type that was registered for matched decoder.
public getDecoderRegisteredMatchedType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface | null
return Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface | null

getEncoder() public method

Get encoder.
public getEncoder ( ) : Neomerx\JsonApi\Contracts\Encoder\EncoderInterface | null
return Neomerx\JsonApi\Contracts\Encoder\EncoderInterface | null

getEncoderHeaderMatchedType() public method

Get media type from 'Accept' header that matched to one of the registered encoder media types.
public getEncoderHeaderMatchedType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\AcceptMediaTypeInterface | null
return Neomerx\JsonApi\Contracts\Http\Headers\AcceptMediaTypeInterface | null

getEncoderRegisteredMatchedType() public method

Get media type that was registered for matched encoder.
public getEncoderRegisteredMatchedType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface | null
return Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface | null

matchDecoder() public method

Find best decoder match for 'Content-Type' header.
public matchDecoder ( Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface $contentTypeHeader ) : void
$contentTypeHeader Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface
return void

matchEncoder() public method

Find best encoder match for 'Accept' header.
public matchEncoder ( Neomerx\JsonApi\Contracts\Http\Headers\AcceptHeaderInterface $acceptHeader ) : void
$acceptHeader Neomerx\JsonApi\Contracts\Http\Headers\AcceptHeaderInterface
return void

registerDecoder() public method

Register decoder.
public registerDecoder ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType, Closure $decoderClosure ) : void
$mediaType Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface
$decoderClosure Closure
return void

registerEncoder() public method

Register encoder.
public registerEncoder ( Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface $mediaType, Closure $encoderClosure ) : void
$mediaType Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface
$encoderClosure Closure
return void

setDecoder() public method

Set decoder.
public setDecoder ( Neomerx\JsonApi\Contracts\Decoder\DecoderInterface | Closur\Closure $decoder ) : Neomerx\JsonApi\Contracts\Decoder\DecoderInterface
$decoder Neomerx\JsonApi\Contracts\Decoder\DecoderInterface | Closur\Closure
return Neomerx\JsonApi\Contracts\Decoder\DecoderInterface

setEncoder() public method

Set encoder.
public setEncoder ( Neomerx\JsonApi\Contracts\Encoder\EncoderInterface | Closur\Closure $encoder ) : void
$encoder Neomerx\JsonApi\Contracts\Encoder\EncoderInterface | Closur\Closure
return void