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

$separator

$separator : string

Link separator

Type

string

$links

$links : array

Page links property

Type

array

$classOn

$classOn : string

Class 'on' name for page link tags

Type

string

$classOff

$classOff : string

Class 'off' name for page link tags

Type

string

Methods

__construct()

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

Constructor

Instantiate the paginator object

Parameters

integer $total
integer $perPage
integer $range

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

setSeparator()

setSeparator(string  $sep) : \Pop\Paginator\Range

Set the bookend separator

Parameters

string $sep

Returns

\Pop\Paginator\Range

setClassOn()

setClassOn(string  $class) : \Pop\Paginator\AbstractPaginator

Set the class 'on' name

Parameters

string $class

Returns

\Pop\Paginator\AbstractPaginator

setClassOff()

setClassOff(string  $class) : \Pop\Paginator\AbstractPaginator

Set the class 'off' name.

Parameters

string $class

Returns

\Pop\Paginator\AbstractPaginator

getSeparator()

getSeparator() : string

Get the bookend separator

Returns

string

getLinkRange()

getLinkRange(integer  $page = 1) : array

Get the page links

Parameters

integer $page

Returns

array

getClassOn()

getClassOn() : string

Get the class 'on' name

Returns

string

getClassOff()

getClassOff() : string

Get the class 'off' name.

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

createRange()

createRange(integer  $page = 1) : void

Create links

Parameters

integer $page