public function hydrateForCreate(
        JsonApiRequestInterface $request,
        ExceptionFactoryInterface $exceptionFactory,
        $domainObject
    ) {
        $data = $request->getResource();
        if ($data === null) {
            throw $exceptionFactory->createDataMemberMissingException($request);
        }

        $this->validateType($data, $exceptionFactory);
        $domainObject = $this->hydrateIdForCreate($domainObject, $data, $request, $exceptionFactory);
        $this->validateRequest($request);
        $domainObject = $this->hydrateAttributes($domainObject, $data);
        $domainObject = $this->hydrateRelationships($domainObject, $data, $exceptionFactory);

        return $domainObject;
    }
public function hydrateForCreate(
        JsonApiRequestInterface $request,
        ExceptionFactoryInterface $exceptionFactory,
        $domainObject
    ) {
        $data = $request->getResource();
        if ($data === null) {
            throw $exceptionFactory->createDataMemberMissingException($request);
        }

        $this->validateType($data, $exceptionFactory);
        $domainObject = $this->hydrateIdForCreate($domainObject, $data, $request, $exceptionFactory);
        $this->validateRequest($request);
        $domainObject = $this->hydrateAttributes($domainObject, $data);
        $domainObject = $this->hydrateRelationships($domainObject, $data, $exceptionFactory);

        return $domainObject;
    }
public function hydrateForCreate ( JsonApiRequestInterface $ request , ExceptionFactoryInterface $ exceptionFactory , $ domainObject ) { $ data = $ request -> getResource ( ) ; if ( $ data === null ) { throw $ exceptionFactory -> createDataMemberMissingException ( $ request ) ; } $ this -> validateType ( $ data , $ exceptionFactory ) ; $ domainObject = $ this -> hydrateIdForCreate ( $ domainObject , $ data , $ request , $ exceptionFactory ) ; $ this -> validateRequest ( $ request ) ; $ domainObject = $ this -> hydrateAttributes ( $ domainObject , $ data ) ; $ domainObject = $ this -> hydrateRelationships ( $ domainObject , $ data , $ exceptionFactory ) ; return $ domainObject ; }
Hydrates the domain object from the creating request.

The domain object's attributes and relationships are hydrated
according to the JSON:API specification.
@param mixed $domainObject
@return mixed
@throws JsonApiExceptionInterface
Hydrates the domain object from the creating request .