Class PaginatedResultSet
Paginated resultset.
Namespace: Cake\Datasource\Paging
Property Summary
-
$params protected
array
Paging params.
Method Summary
-
__construct() public
Constructor
-
count() public
-
currentPage() public
Get current page number.
-
hasNextPage() public
Get whether there's a next page.
-
hasPrevPage() public
Get whether there's a previous page.
-
items() public
Get paginated items.
-
jsonSerialize() public
Provide data which should be serialized to JSON.
-
pageCount() public
Get total page count.
-
pagingParam() public
Get paging param.
-
pagingParams() public
Get all paging params.
-
perPage() public
Get items per page.
-
totalCount() public
Get Total items counts.
Method Detail
__construct() ¶ public
__construct(Traversable<T> $results, array $params)
Constructor
Parameters
-
Traversable<T>
$results Resultset instance.
-
array
$params Paging params.
jsonSerialize() ¶ public
jsonSerialize(): array
Provide data which should be serialized to JSON.
Returns
array
pagingParam() ¶ public
pagingParam(string $name): mixed
Get paging param.
Parameters
-
string
$name
Returns
mixed