Documentation

AbstractPaginator
in package

Abstract paginator type class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
3.1.0

Table of Contents

$bookends  : array<string|int, mixed>
Page bookends
$currentPage  : int
Current page property
$end  : int
Current page end index property
$numberOfPages  : int
Number of pages property
$perPage  : int
Number of items per page
$queryKey  : string
Query key
$range  : int
Range of pages per page
$start  : int
Current page start index property
$total  : int
Total number of items
__construct()  : mixed
Constructor
calculateRange()  : array<string|int, mixed>
Calculate the page range
getBookend()  : string
Get a bookend
getBookends()  : array<string|int, mixed>
Get the bookends
getCurrentPage()  : int
Get the current page
getNumberOfPages()  : int
Get the number of pages
getPerPage()  : int
Get the per page
getQueryKey()  : int
Get the query key
getRange()  : int
Get the page range
getTotal()  : int
Get the content items total
setBookends()  : AbstractPaginator
Set the bookends
setQueryKey()  : AbstractPaginator
Set the query key

Properties

$bookends

Page bookends

protected array<string|int, mixed> $bookends = ['start' => '&laquo;', 'previous' => '&lsaquo;', 'next' => '&rsaquo;', 'end' => '&raquo;']

Methods

__construct()

Constructor

public __construct(int $total[, int $perPage = 10 ][, int $range = 10 ]) : mixed

Instantiate the paginator object

Parameters
$total : int
$perPage : int = 10
$range : int = 10
Return values
mixed

calculateRange()

Calculate the page range

public calculateRange([int $page = 1 ]) : array<string|int, mixed>
Parameters
$page : int = 1
Return values
array<string|int, mixed>

getBookend()

Get a bookend

public getBookend(string $key) : string
Parameters
$key : string
Return values
string

getBookends()

Get the bookends

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

getCurrentPage()

Get the current page

public getCurrentPage() : int
Return values
int

getNumberOfPages()

Get the number of pages

public getNumberOfPages() : int
Return values
int

getPerPage()

Get the per page

public getPerPage() : int
Return values
int

getQueryKey()

Get the query key

public getQueryKey() : int
Return values
int

getRange()

Get the page range

public getRange() : int
Return values
int

getTotal()

Get the content items total

public getTotal() : int
Return values
int

Search results