src/DataProvider/Pagination.php
public function getPagination(string $resourceClass = null, string $operationName = null, array $context = []): array
    {
        $page = $this->getPage($context);
        $limit = $this->getLimit($resourceClass, $operationName, $context);

        if (0 === $limit && 1 < $page) {
            throw new InvalidArgumentException('Page should not be greater than 1 if limit is equal to 0');
        }

        return [$page, $this->getOffset($resourceClass, $operationName, $context), $limit];
    }
public function getPagination(string $resourceClass = null, string $operationName = null, array $context = []): array
    {
        $page = $this->getPage($context);
        $limit = $this->getLimit($resourceClass, $operationName, $context);

        if (0 === $limit && 1 < $page) {
            throw new InvalidArgumentException('Page should not be greater than 1 if limit is equal to 0');
        }

        return [$page, $this->getOffset($resourceClass, $operationName, $context), $limit];
    }
public function getPagination ( string $ resourceClass = null , string $ operationName = null , array $ context = [ ] ) : array { $ page = $ this -> getPage ( $ context ) ; $ limit = $ this -> getLimit ( $ resourceClass , $ operationName , $ context ) ; if ( 0 === $ limit && 1 < $ page ) { throw new InvalidArgumentException ( 'Page should not be greater than 1 if limit is equal to 0' ) ; } return [ $ page , $ this -> getOffset ( $ resourceClass , $ operationName , $ context ) , $ limit ] ; }
Gets info about the pagination.

Returns an array with the following info as values:
- the page {@see Pagination::getPage()}
- the offset {@see Pagination::getOffset()}
- the limit {@see Pagination::getLimit()}

@throws InvalidArgumentException
Gets info about the pagination .