\Pop\PaginatorAbstractPaginator

Abstract paginator type class

Summary

Methods
Properties
Constants
__construct()
setQueryKey()
setBookends()
getTotal()
getPerPage()
getRange()
getQueryKey()
getCurrentPage()
getNumberOfPages()
getBookend()
getBookends()
calculateRange()
No public properties found
No constants found
No protected methods found
$total
$perPage
$range
$queryKey
$currentPage
$numberOfPages
$start
$end
$bookends
N/A
No private methods found
No private properties found
N/A

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

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

calculateRange()

calculateRange(integer  $page = 1) : array

Calculate the page range

Parameters

integer $page

Returns

array