/** * @param mixed $domainObject * @param array $data * @param \WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory * @return mixed * @throws \Exception */ protected function hydrateIdForUpdate($domainObject, $data, ExceptionFactoryInterface $exceptionFactory) { if (empty($data["id"])) { throw $exceptionFactory->createResourceIdMissingException(); } $result = $this->setId($domainObject, $data["id"]); if ($result) { $domainObject = $result; } return $domainObject; }