public createQueryParamUnrecognizedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $queryParamName ) : Exception | ||
$request | WoohooLabs\Yin\JsonApi\Request\RequestInterface | |
$queryParamName | string | |
return | Exception |
public function createQueryParamUnrecognizedException(RequestInterface $request, $queryParamName);
/** * @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); } } }