public createDataMemberMissingException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception | ||
$request | WoohooLabs\Yin\JsonApi\Request\RequestInterface | |
Результат | Exception |
/** * Hydrates the domain object from the updating request. * * The domain object's attributes and relationships are hydrated * according to the JSON API specification. * * @param \WoohooLabs\Yin\JsonApi\Request\RequestInterface $request * @param \WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory * @param mixed $domainObject * @return mixed * @throws \Exception */ public function hydrateForUpdate(RequestInterface $request, ExceptionFactoryInterface $exceptionFactory, $domainObject) { $data = $request->getResource(); if ($data === null) { throw $exceptionFactory->createDataMemberMissingException($request); } $this->validateType($data, $exceptionFactory); $domainObject = $this->hydrateIdForUpdate($domainObject, $data, $exceptionFactory); $domainObject = $this->hydrateAttributes($domainObject, $data); $domainObject = $this->hydrateRelationships($domainObject, $data, $exceptionFactory); return $domainObject; }