createResourceIdMissingException() public method

public createResourceIdMissingException ( ) : Exception
return Exception
示例#1
0
 /**
  * @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;
 }