Paginator
class Paginator
Paginating math.
Properties
| int | $page | ||
| int | $base | ||
| positive-int | $itemsPerPage | ||
| ?int<0, max> | $itemCount | ||
| int read-only | $firstPage | ||
| ?int read-only | $lastPage | ||
| int<0, max> read-only | $firstItemOnPage | ||
| int<0, max> read-only | $lastItemOnPage | ||
| bool read-only | $first | ||
| bool read-only | $last | ||
| ?int<0, max> read-only | $pageCount | ||
| int<0, max> read-only | $offset | ||
| ?int<0, max> read-only | $countdownOffset | ||
| int<0, max> read-only | $length |
Methods
No description
No description
No description
Returns the 1-based index of the first item on the current page, or 0 if the page is empty.
Returns the 1-based index of the last item on the current page.
No description
Returns zero-based page number.
No description
No description
No description
No description
No description
No description
No description
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 46
Paginator
setPage(int $page)
No description
at line 53
int
getPage()
No description
at line 59
int
getFirstPage()
No description
at line 65
int|null
getLastPage()
No description
at line 77
int
getFirstItemOnPage()
Returns the 1-based index of the first item on the current page, or 0 if the page is empty.
at line 89
int
getLastItemOnPage()
Returns the 1-based index of the last item on the current page.
at line 95
Paginator
setBase(int $base)
No description
at line 102
int
getBase()
No description
at line 112
protected int
getPageIndex()
Returns zero-based page number.
at line 121
bool
isFirst()
No description
at line 127
bool
isLast()
No description
at line 138
int|null
getPageCount()
No description
at line 146
Paginator
setItemsPerPage(int $itemsPerPage)
No description
at line 156
int
getItemsPerPage()
No description
at line 162
Paginator
setItemCount(int|null $itemCount = null)
No description
at line 172
int|null
getItemCount()
No description
at line 182
int
getOffset()
Returns the absolute index of the first item on current page.
at line 192
int|null
getCountdownOffset()
Returns the absolute index of the first item on current page in countdown paging.
at line 204
int
getLength()
Returns the number of items on current page.
Traits
Strict class for better experience.