PHP Class WoohooLabs\Yin\JsonApi\Hydrator\AbstractHydrator

Inheritance: implements WoohooLabs\Yin\JsonApi\Hydrator\HydratorInterface, implements WoohooLabs\Yin\JsonApi\Hydrator\UpdateRelationshipHydratorInterface, use trait HydratorTrait, use trait WoohooLabs\Yin\JsonApi\Hydrator\CreateHydratorTrait, use trait UpdateHydratorTrait
Mostrar archivo Open project: woohoolabs/yin

Public Methods

Method Description
hydrate ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, mixed $domainObject ) : mixed Hydrates the domain object from the request based on the request method.
hydrateRelationship ( string $relationship, WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, mixed $domainObject ) : mixed

Method Details

hydrate() public method

If the request method is POST then the domain object is hydrated as a create. If it is a PATCH request then the domain object is hydrated as an update.
public hydrate ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, mixed $domainObject ) : mixed
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$domainObject mixed
return mixed

hydrateRelationship() public method

public hydrateRelationship ( string $relationship, WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, mixed $domainObject ) : mixed
$relationship string
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$domainObject mixed
return mixed