Phpxforms documentation

Paginator
in package

Simple pagination with numbers

Tags
author

DaVee

version
0.87dev
license

Lesser General Public License 2.1 or later; see http://www.gnu.org/licenses/lgpl-2.1.html

Table of Contents

Properties

$buttons  : array<string, array<string, string|null>>
$current  : int
$divide  : string
$mark  : string
$maxPage  : int
$perPage  : int
$total  : int

Methods

__construct()  : mixed
getCurrent()  : int
Get current page
getOffset()  : int
Get offset start form sql
getPager()  : string
Get pager
getPerPage()  : int
Get number of records per page
getSql()  : string
Get formatted LIMIT for database request
getTotal()  : int
Get total number of records
setTotal()  : void
Set total number of records
getBtnLink()  : string
Get custom style for links with text
loadCurrent()  : void
Load current page

Properties

$buttons

public static array<string, array<string, string|null>> $buttons = ['first' => ['CLASS' => null, 'NAME' => '&lt;&lt;'], 'prev' => ['CLASS' => null, 'NAME' => '&lt;'], 'next' => ['CLASS' => null, 'NAME' => '&gt;'], 'last' => ['CLASS' => null, 'NAME' => '&gt;&gt;']]

Methods

__construct()

public __construct([int $perPage = 20 ][, string $mark = 'page' ][, int $maxPage = 0 ][, string $divide = ' | ' ]) : mixed
Parameters
$perPage : int = 20
$mark : string = 'page'
$maxPage : int = 0
$divide : string = ' | '

getCurrent()

Get current page

public getCurrent() : int
Return values
int

getOffset()

Get offset start form sql

public getOffset() : int
Return values
int

getPager()

Get pager

public getPager(string $pageUrl) : string
Parameters
$pageUrl : string
Return values
string

getPerPage()

Get number of records per page

public getPerPage() : int
Return values
int

getSql()

Get formatted LIMIT for database request

public getSql() : string
Return values
string

getTotal()

Get total number of records

public getTotal() : int
Return values
int

setTotal()

Set total number of records

public setTotal(int $total) : void
Parameters
$total : int

Get custom style for links with text

protected getBtnLink(array<string, string|null> $btn) : string
Parameters
$btn : array<string, string|null>
Return values
string

loadCurrent()

Load current page

protected loadCurrent() : void

        
On this page

Search results