Method |
Description |
|
__construct ( mixed $count, integer $limit, array $params = [] ) |
Constructor |
|
__debuginfo ( ) : array |
Improved var_dump() output |
|
countItems ( ) : integer |
Returns the total number of items in the collection |
|
countPages ( ) : integer |
Returns the total number of pages |
|
firstPage ( ) : integer |
Returns the number of the first page |
|
firstPageURL ( ) : string |
Returns the url for the first page |
|
hasNextPage ( ) : boolean |
Checks if there's a next page |
|
hasPages ( ) : boolean |
Checks if multiple pages are needed
or if the collection can be displayed on a single page |
|
hasPrevPage ( ) : boolean |
Checks if there's a previous page |
|
isFirstPage ( ) : boolean |
Checks if the current page is the first page |
|
isLastPage ( ) : boolean |
Checks if the current page is the last page |
|
items ( ) : integer |
Alternative for countItems() |
|
lastPage ( ) : integer |
Returns the number of the last page |
|
lastPageURL ( ) : string |
Returns the url for the last page |
|
limit ( ) : integer |
Returns the chosen limit
This is used for the slice() method together with
the offset to get the correct items from collections |
|
nextPage ( ) : integer |
Returns the number of the next page |
|
nextPageURL ( ) : string |
Returns the url for the next page |
|
numEnd ( ) : integer |
Returns the index number of the last item on the current page
Can be used to display something like
"Currently showing 1 - 10 of 123 items" |
|
numStart ( ) : integer |
Returns the index number of the first item on the current page
Can be used to display something like
"Currently showing 1 - 10 of 123 items" |
|
offset ( ) : integer |
Returns the current offset
This is used for the slice() method together with
the limit to get the correct items from collections |
|
page ( ) : integer |
Returns the current page number |
|
pageURL ( integer $page ) : string |
Returns a page url for any given page number |
|
pages ( ) : integer |
Alternative for countPages() |
|
prevPage ( ) : integer |
Returns the number of the previous page |
|
prevPageURL ( ) : string |
Returns the url for the previous page |
|
range ( $range = 5 ) : array |
Creates a range of page numbers for Google-like pagination |
|
rangeEnd ( ) : integer |
Returns the last page of the created range |
|
rangeStart ( ) : integer |
Returns the first page of the created range |
|
redirect ( ) |
Redirects to an error page if the redirect option is set
and the pagination is beyond the allowed boundaries |
|
toArray ( ) : array |
Returns the most important pagination data into a readable array |
|