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

createSortingUnsupportedException() public method

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

Usage Example

示例#1
0
文件: JsonApi.php 项目: garethwi/yin
 /**
  * Disables sorting.
  *
  * If the current request contains sorting criteria, it throws a SortingNotSupported exception.
  *
  * @throws \WoohooLabs\Yin\JsonApi\Exception\SortingUnsupported
  */
 public function disableSorting()
 {
     if ($this->request->getQueryParam("sort") !== null) {
         throw $this->exceptionFactory->createSortingUnsupportedException($this->request);
     }
 }