PHP Class WoohooLabs\Yin\JsonApi\JsonApi

ファイルを表示 Open project: woohoolabs/yin

Public Properties

Property Type Description
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$response Psr\Http\Message\ResponseInterface

Protected Properties

Property Type Description
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$serializer WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface

Public Methods

Method Description
__construct ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory = null, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer = null )
disableIncludes ( ) Disables inclusion of related resources.
disableSorting ( ) Disables sorting.
getExceptionFactory ( ) : WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
getRequest ( ) : WoohooLabs\Yin\JsonApi\Request\RequestInterface Returns the current JSON API request.
getResponse ( ) : Psr\Http\Message\ResponseInterface
hydrate ( WoohooLabs\Yin\JsonApi\Hydrator\HydratorInterface $hydrator, $domainObject ) : mixed
hydrateRelationship ( string $relationship, WoohooLabs\Yin\JsonApi\Hydrator\UpdateRelationshipHydratorInterface $hydrator, $domainObject ) : mixed
respond ( ) : Responder
respondWithRelationship ( string $relationship ) : RelationshipResponder
setExceptionFactory ( WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory )
setRequest ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request )
setResponse ( Psr\Http\Message\ResponseInterface $response )

Method Details

__construct() public method

public __construct ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory = null, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer = null )
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$response Psr\Http\Message\ResponseInterface
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$serializer WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface

disableIncludes() public method

If the current request asks for inclusion of related resources, it throws an InclusionNotSupported exception.
public disableIncludes ( )

disableSorting() public method

If the current request contains sorting criteria, it throws a SortingNotSupported exception.
public disableSorting ( )

getExceptionFactory() public method

public getExceptionFactory ( ) : WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
return WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface

getRequest() public method

Returns the current JSON API request.
public getRequest ( ) : WoohooLabs\Yin\JsonApi\Request\RequestInterface
return WoohooLabs\Yin\JsonApi\Request\RequestInterface

getResponse() public method

public getResponse ( ) : Psr\Http\Message\ResponseInterface
return Psr\Http\Message\ResponseInterface

hydrate() public method

public hydrate ( WoohooLabs\Yin\JsonApi\Hydrator\HydratorInterface $hydrator, $domainObject ) : mixed
$hydrator WoohooLabs\Yin\JsonApi\Hydrator\HydratorInterface
$domainObject
return mixed

hydrateRelationship() public method

public hydrateRelationship ( string $relationship, WoohooLabs\Yin\JsonApi\Hydrator\UpdateRelationshipHydratorInterface $hydrator, $domainObject ) : mixed
$relationship string
$hydrator WoohooLabs\Yin\JsonApi\Hydrator\UpdateRelationshipHydratorInterface
$domainObject
return mixed

respond() public method

public respond ( ) : Responder
return WoohooLabs\Yin\JsonApi\Response\Responder

respondWithRelationship() public method

public respondWithRelationship ( string $relationship ) : RelationshipResponder
$relationship string
return WoohooLabs\Yin\JsonApi\Response\RelationshipResponder

setExceptionFactory() public method

public setExceptionFactory ( WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory )
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface

setRequest() public method

public setRequest ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request )
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface

setResponse() public method

public setResponse ( Psr\Http\Message\ResponseInterface $response )
$response Psr\Http\Message\ResponseInterface

Property Details

$exceptionFactory protected_oe property

protected ExceptionFactoryInterface,WoohooLabs\Yin\JsonApi\Exception $exceptionFactory
return WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface

$request public_oe property

public RequestInterface,WoohooLabs\Yin\JsonApi\Request $request
return WoohooLabs\Yin\JsonApi\Request\RequestInterface

$response public_oe property

public ResponseInterface,Psr\Http\Message $response
return Psr\Http\Message\ResponseInterface

$serializer protected_oe property

protected SerializerInterface,WoohooLabs\Yin\JsonApi\Serializer $serializer
return WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface