Paginator
class Paginator extends Object
Paginating math.
Properties
int | $page | ||
int | $base | ||
int | $itemsPerPage | ||
int|null | $itemCount | ||
int read-only | $firstPage | ||
int|null read-only | $lastPage | ||
bool read-only | $first | ||
bool read-only | $last | ||
int|null read-only | $pageCount | ||
int read-only | $offset | ||
int|null read-only | $countdownOffset | ||
int|null read-only | $length |
Methods
Returns current page number.
Returns first page number.
Returns last page number.
Returns first page (base) number.
Returns zero-based page number.
Is the current page the first one?
Is the current page the last one?
Returns the total number of pages.
Sets the number of items to display on a single page.
Returns the number of items to display on a single page.
Sets the total number of items.
Returns the total number of items.
Returns the absolute index of the first item on current page.
Returns the absolute index of the first item on current page in countdown paging.
Returns the number of items on current page.
Details
at line 49
Paginator
setPage($page)
Sets current page number.
at line 60
int
getPage()
Returns current page number.
at line 70
int
getFirstPage()
Returns first page number.
at line 80
int|null
getLastPage()
Returns last page number.
at line 91
Paginator
setBase($base)
Sets first page (base) number.
at line 102
int
getBase()
Returns first page (base) number.
at line 112
protected int
getPageIndex()
Returns zero-based page number.
at line 123
bool
isFirst()
Is the current page the first one?
at line 133
bool
isLast()
Is the current page the last one?
at line 143
int|null
getPageCount()
Returns the total number of pages.
at line 154
Paginator
setItemsPerPage($itemsPerPage)
Sets the number of items to display on a single page.
at line 165
int
getItemsPerPage()
Returns the number of items to display on a single page.
at line 176
Paginator
setItemCount($itemCount)
Sets the total number of items.
at line 187
int|null
getItemCount()
Returns the total number of items.
at line 197
int
getOffset()
Returns the absolute index of the first item on current page.
at line 207
int|null
getCountdownOffset()
Returns the absolute index of the first item on current page in countdown paging.
at line 219
int|null
getLength()
Returns the number of items on current page.