Properties

$total

$total : integer

Total number of items

Type

integer

$perPage

$perPage : integer

Number of items per page

Type

integer

$range

$range : integer

Range of pages per page

Type

integer

$queryKey

$queryKey : string

Query key

Type

string

$currentPage

$currentPage : integer

Current page property

Type

integer

$numberOfPages

$numberOfPages : integer

Number of pages property

Type

integer

$start

$start : integer

Current page start index property

Type

integer

$end

$end : integer

Current page end index property

Type

integer

$bookends

$bookends : array

Page bookends

Type

array

$inputSeparator

$inputSeparator : string

Input separator

Type

string

$form

$form : string

Page form property

Type

string

Methods

__construct()

__construct(integer  $total, integer  $perPage = 10) 

Constructor

Instantiate the paginator object

Parameters

integer $total
integer $perPage

setBookends()

setBookends(array  $bookends) : \Pop\Paginator\AbstractPaginator

Set the bookends

Parameters

array $bookends

Returns

\Pop\Paginator\AbstractPaginator

getTotal()

getTotal() : integer

Get the content items total

Returns

integer

getPerPage()

getPerPage() : integer

Get the per page

Returns

integer

getRange()

getRange() : integer

Get the page range

Returns

integer

getQueryKey()

getQueryKey() : integer

Get the query key

Returns

integer

getCurrentPage()

getCurrentPage() : integer

Get the current page

Returns

integer

getNumberOfPages()

getNumberOfPages() : integer

Get the number of pages

Returns

integer

getBookend()

getBookend(string  $key) : string

Get a bookend

Parameters

string $key

Returns

string

getBookends()

getBookends() : array

Get the bookends

Returns

array

setInputSeparator()

setInputSeparator(string  $separator) : \Pop\Paginator\Form

Set input separator

Parameters

string $separator

Returns

\Pop\Paginator\Form

getInputSeparator()

getInputSeparator() : string

Get input separator

Returns

string

getFormString()

getFormString(integer  $page = 1) : string

Get the page form string

Parameters

integer $page

Returns

string

__toString()

__toString() : string

Output the rendered page links

Returns

string

calculateRange()

calculateRange(integer  $page = 1) : array

Calculate the page range

Parameters

integer $page

Returns

array

createForm()

createForm(integer  $page = 1) : void

Create links

Parameters

integer $page