Detailed Description
PagingInfo contains information about a paged list.
Definition at line 18 of file PagingInfo.php.
Public Member Functions | |
__construct ($pageSize, $ignoreTotalCount=false) | |
setTotalCount ($totalCount) | |
getTotalCount () | |
setPage ($page) | |
getPage () | |
getPageSize () | |
getPageCount () | |
setOffset ($offset) | |
getOffset () | |
isOnFirstPage () | |
isOnLastPage () | |
isIgnoringTotalCount () | |
Constructor & Destructor Documentation
__construct | ( | $pageSize, | |
$ignoreTotalCount = false |
|||
) |
Creates a PagingInfo object.
The ignoreTotalCount parameter may be set to true, if the count is to be ignored. This may speed up loading of objects, because an extra count query may be omitted.
- Parameters
-
$pageSize The pageSize (-1 to set no page size) $ignoreTotalCount Boolean whether this instance ignores the total count or not (optional, default: false)
Definition at line 34 of file PagingInfo.php.
Member Function Documentation
setTotalCount | ( | $totalCount | ) |
Set the number of list items.
- Parameters
-
$totalCount The number of list items.
Definition at line 43 of file PagingInfo.php.
getTotalCount | ( | ) |
setPage | ( | $page | ) |
Set the current page (1-based) (also sets the offset).
- Parameters
-
$page The current page.
Definition at line 59 of file PagingInfo.php.
getPage | ( | ) |
getPageSize | ( | ) |
getPageCount | ( | ) |
setOffset | ( | $offset | ) |
Set the current offset (also selects the page).
- Parameters
-
$offset The current list offset.
Definition at line 92 of file PagingInfo.php.
getOffset | ( | ) |
isOnFirstPage | ( | ) |
Determine if we are on the first page.
- Returns
- Boolean
Definition at line 109 of file PagingInfo.php.
isOnLastPage | ( | ) |
Determine if we are on the first page.
- Returns
- Boolean
Definition at line 117 of file PagingInfo.php.
isIgnoringTotalCount | ( | ) |
Check if this instance iignores the total count.
- Returns
- Boolean
Definition at line 125 of file PagingInfo.php.