WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface::createInclusionUnsupportedException PHP Method

createInclusionUnsupportedException() public method

public createInclusionUnsupportedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
return Exception
    public function createInclusionUnsupportedException(RequestInterface $request);

Usage Example

示例#1
0
文件: JsonApi.php 项目: garethwi/yin
 /**
  * Disables inclusion of related resources.
  *
  * If the current request asks for inclusion of related resources, it throws an InclusionNotSupported exception.
  *
  * @throws \WoohooLabs\Yin\JsonApi\Exception\InclusionUnsupported
  */
 public function disableIncludes()
 {
     if ($this->request->getQueryParam("include") !== null) {
         throw $this->exceptionFactory->createInclusionUnsupportedException($this->request);
     }
 }