createQueryParamUnrecognizedException() 공개 메소드

public createQueryParamUnrecognizedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $queryParamName ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$queryParamName string
리턴 Exception
예제 #1
0
파일: Request.php 프로젝트: woohoolabs/yin
 /**
  * @throws \WoohooLabs\Yin\JsonApi\Exception\QueryParamUnrecognized
  */
 public function validateQueryParams()
 {
     foreach ($this->getQueryParams() as $queryParamName => $queryParamValue) {
         if (preg_match("/^([a-z]+)\$/", $queryParamName) && in_array($queryParamName, ["fields", "include", "sort", "page", "filter"]) === false) {
             throw $this->exceptionFactory->createQueryParamUnrecognizedException($this, $queryParamName);
         }
     }
 }