Documentation

Pagination extends AbstractPagination

Class Pagination

Table of Contents

Properties

$defaultOptions  : array<string|int, mixed>
$limit  : int
$options  : array<string|int, mixed>
$page  : int|null
$pages  : int
$pagesStart  : int
$pagesStop  : int
$route  : Route
$start  : int|null
$total  : int
$viewAll  : bool

Methods

__construct()  : mixed
Pagination constructor.
count()  : int
getFirstPage()  : PaginationPage|null
getIterator()  : ArrayIterator
getLastPage()  : PaginationPage|null
getLimit()  : int
getNextNumber()  : int|null
getNextPage()  : PaginationPage|null
getOptions()  : array<string|int, mixed>
getPage()  : PaginationPage|null
getPageNumber()  : int
getPages()  : array<string|int, mixed>
getPrevNumber()  : int|null
getPrevPage()  : PaginationPage|null
getRoute()  : Route|null
getStart()  : int
getTotal()  : int
getTotalPages()  : int
isEnabled()  : bool
calculateLimits()  : void
calculateRange()  : void
initialize()  : void
loadItems()  : void
setLimit()  : $this
setOptions()  : $this
setPage()  : $this
setRoute()  : $this
setStart()  : $this
setTotal()  : $this

Properties

$defaultOptions

protected array<string|int, mixed> $defaultOptions = ['type' => 'page', 'limit' => 10, 'display' => 5, 'opening' => 0, 'ending' => 0, 'url' => null, 'param' => null, 'use_query_param' => false]

Methods

__construct()

Pagination constructor.

public __construct(Route $route, int $total[, int|null $pos = null ][, int|null $limit = null ][, array<string|int, mixed>|null $options = null ]) : mixed
Parameters
$route : Route
$total : int
$pos : int|null = null
$limit : int|null = null
$options : array<string|int, mixed>|null = null

getIterator()

public getIterator() : ArrayIterator
Tags
phpstan-return

ArrayIterator<int,PaginationPage>

Attributes
#[ReturnTypeWillChange]
Return values
ArrayIterator

getNextNumber()

public getNextNumber([int $count = 1 ]) : int|null
Parameters
$count : int = 1
Return values
int|null

getOptions()

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPages()

public getPages() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPrevNumber()

public getPrevNumber([int $count = 1 ]) : int|null
Parameters
$count : int = 1
Return values
int|null

initialize()

protected initialize(Route $route, int $total[, int|null $pos = null ][, int|null $limit = null ][, array<string|int, mixed>|null $options = null ]) : void
Parameters
$route : Route
$total : int
$pos : int|null = null
$limit : int|null = null
$options : array<string|int, mixed>|null = null

setLimit()

protected setLimit([int|null $limit = null ]) : $this
Parameters
$limit : int|null = null
Return values
$this

setOptions()

protected setOptions([array<string|int, mixed>|null $options = null ]) : $this
Parameters
$options : array<string|int, mixed>|null = null
Return values
$this

setPage()

protected setPage([int|null $page = null ]) : $this
Parameters
$page : int|null = null
Return values
$this

setStart()

protected setStart([int|null $start = null ]) : $this
Parameters
$start : int|null = null
Return values
$this

setTotal()

protected setTotal(int $total) : $this
Parameters
$total : int
Return values
$this

        
On this page

Search results