Pagination
in package
implements
JsonSerializable
Interfaces, Classes, Traits and Enums
- JsonSerializable
Table of Contents
- CURRENT_PAGE = 'currentPage'
- ITEMS_ON_PAGE = 'itemsOnPage'
- PAGES_COUNT = 'pagesCount'
- $currentPage : int
- $itemsOnPage : int
- $pagesCount : int
- __construct() : mixed
- calculatePagesCount() : void
- calculates number of pages
- generateSQL() : string
- generates pagination SQL code
- jsonSerialize() : array<string|int, mixed>
- {@inheritDoc}
Constants
CURRENT_PAGE
public
mixed
CURRENT_PAGE
= 'currentPage'
ITEMS_ON_PAGE
public
mixed
ITEMS_ON_PAGE
= 'itemsOnPage'
PAGES_COUNT
public
mixed
PAGES_COUNT
= 'pagesCount'
Properties
$currentPage
private
int
$currentPage
$itemsOnPage
private
int
$itemsOnPage
$pagesCount
private
int
$pagesCount
Methods
__construct()
public
__construct(int $currentPage, int $itemsOnPage) : mixed
Parameters
- $currentPage : int
- $itemsOnPage : int
Return values
mixed —calculatePagesCount()
calculates number of pages
public
calculatePagesCount(int $itemsCount) : void
Parameters
- $itemsCount : int
Return values
void —generateSQL()
generates pagination SQL code
public
generateSQL() : string
Return values
string —jsonSerialize()
{@inheritDoc}
public
jsonSerialize() : array<string|int, mixed>