Paginator
in package
implements
IteratorAggregate
Class Paginator
Tool to paginate result from query through multiple pages
TODO This tool is outdated, it was not recently tested
Table of Contents
Interfaces
- IteratorAggregate
Properties
- $displayEmpty : bool
- $layout : string
- $page : int
- $pageDelta : int
- $query : SqlSelectRequest
- $rendered : string|null
- $rowCount : int
- $rowPerPage : int
- $url : string
Methods
- __construct() : mixed
- __toString() : string
- getDisplayEmpty() : bool
- getIterator() : Traversable
- getLastPage() : int
- getLayout() : string
- getMajorPage() : int
- getMinorPage() : int
- getPage() : int
- getPageDelta() : int
- getPageLink() : string
- getQuery() : SqlSelectRequest
- getRendered() : string
- getRowCount() : int
- getRowPerPage() : int
- getUrl() : string
- next() : mixed
- render() : string|null
- setDisplayEmpty() : static
- setLayout() : static
- setPage() : static
- setPageDelta() : static
- setQuery() : static
- setRowPerPage() : static
- setUrl() : static
- verify() : HttpResponse|null
- calculate() : void
Properties
$displayEmpty
protected
bool
$displayEmpty
= false
$layout
protected
string
$layout
$page
protected
int
$page
$pageDelta
protected
int
$pageDelta
= 3
$query
protected
SqlSelectRequest
$query
$rendered
protected
string|null
$rendered
= null
$rowCount
protected
int
$rowCount
$rowPerPage
protected
int
$rowPerPage
= 100
$url
protected
string
$url
Methods
__construct()
public
__construct(string $route, SqlSelectRequest $query[, int $page = 1 ][, int $rowPerPage = 100 ]) : mixed
Parameters
- $route : string
- $query : SqlSelectRequest
- $page : int = 1
- $rowPerPage : int = 100
__toString()
public
__toString() : string
Return values
stringgetDisplayEmpty()
public
getDisplayEmpty() : bool
Return values
boolgetIterator()
public
getIterator() : Traversable
Return values
TraversablegetLastPage()
public
getLastPage() : int
Return values
intgetLayout()
public
getLayout() : string
Return values
stringgetMajorPage()
public
getMajorPage() : int
Return values
intgetMinorPage()
public
getMinorPage() : int
Return values
intgetPage()
public
getPage() : int
Return values
intgetPageDelta()
public
getPageDelta() : int
Return values
intgetPageLink()
public
getPageLink(mixed $page) : string
Parameters
- $page : mixed
Return values
stringgetQuery()
public
getQuery() : SqlSelectRequest
Return values
SqlSelectRequestgetRendered()
public
getRendered() : string
Return values
stringgetRowCount()
public
getRowCount() : int
Return values
intgetRowPerPage()
public
getRowPerPage() : int
Return values
intgetUrl()
public
getUrl() : string
Return values
stringnext()
public
next() : mixed
render()
public
render() : string|null
Return values
string|nullsetDisplayEmpty()
public
setDisplayEmpty(bool $displayEmpty) : static
Parameters
- $displayEmpty : bool
Return values
staticsetLayout()
public
setLayout(string $layout) : static
Parameters
- $layout : string
Return values
staticsetPage()
public
setPage(int $page) : static
Parameters
- $page : int
Return values
staticsetPageDelta()
public
setPageDelta(int $pageDelta) : static
Parameters
- $pageDelta : int
Return values
staticsetQuery()
public
setQuery(SqlSelectRequest $query) : static
Parameters
- $query : SqlSelectRequest
Return values
staticsetRowPerPage()
public
setRowPerPage(int $rowPerPage) : static
Parameters
- $rowPerPage : int
Return values
staticsetUrl()
public
setUrl(string $url) : static
Parameters
- $url : string
Return values
staticverify()
public
verify() : HttpResponse|null
Return values
HttpResponse|nullcalculate()
protected
calculate() : void