Paginator

Class for performing pagination calculations.
Methods Summary
public
# setCurrentPage( int $currentPage )
Set the current page number.
public
# getCurrentPage( )
Get the current page number.
public
# setPerPage( int $perPage )
Set the number of records per page.
public
# getPerPage( )
Get the number of records per page.
public
# setTotalCount( int $totalCount )
Set the total record count.
public
# getTotalCount( )
Get the total record count.
public
# getOffset( )
Get the record offset.
public
# getPageCount( )
Get the number of pages.
public
# getPreviousPage( )
Get the previous page number. Returns null when there is no previous page.
public
# getNextPage( )
Get the next page number. Returns null when there is no next page.
Constants Summary
public int CURRENT_PAGE
The default current page.
# 1
public int PER_PAGE
The default number of records per page.
# 25
public int TOTAL_COUNT
The default total record count.
# 0
Properties Summary
protected Omeka\Stdlib\ServiceLocatorInterface $services
# NULL
protected int $currentPage
The current page number
# 1
protected int $perPage
The number of records per page
# 25
protected $totalCount
The total record count.
# 0