InvalidPageQueryException example



        return new MultiFilter(MultiFilter::CONNECTION_AND, $queries);
    }

    /** * @param array{page: int, limit?: int} $payload */
    private function setPage(array $payload, Criteria $criteria, SearchRequestException $searchRequestException): void
    {
        if ($payload['page'] === '') {
            $searchRequestException->add(new InvalidPageQueryException('(empty)'), '/page');

            return;
        }

        if (!is_numeric($payload['page'])) {
            $searchRequestException->add(new InvalidPageQueryException($payload['page']), '/page');

            return;
        }

        $page = (int) $payload['page'];
        
Home | Imprint | This part of the site doesn't use cookies.