\LibPaginator

Summary

Methods
Properties
Constants
__construct()
getStart()
setTotal()
getLimit()
pageLinks()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
setInstance()
$_perPage
$_instance
$_page
$_limit
$_totalRows
N/A

Properties

$_perPage

$_perPage : \Lib\numeric

set the number of items per page.

Type

\Lib\numeric

$_instance

$_instance : string

set get parameter for fetching the page number

Type

string

$_page

$_page : \Lib\numeric

sets the page number.

Type

\Lib\numeric

$_limit

$_limit : string

set the limit for the data source

Type

string

$_totalRows

$_totalRows : \Lib\numeric

set the total number of records/items.

Type

\Lib\numeric

Methods

__construct()

__construct(  $perPage,   $instance) 

__construct

pass values when class is istantiated

Parameters

$perPage
$instance

getStart()

getStart() : \Lib\numeric

getStart

creates the starting point for limiting the dataset

Returns

\Lib\numeric

setTotal()

setTotal(  $_totalRows) 

setTotal

collect a numberic value and assigns it to the totalRows

Parameters

$_totalRows

getLimit()

getLimit() : string

getLimit

returns the limit for the data source, calling the getStart method and passing in the number of items perp page

Returns

string

pageLinks()

pageLinks(  $path = '?',   $ext = null) : string

pageLinks

create the html links for navigating through the dataset

Parameters

$path
$ext

Returns

string —

returns the html menu

setInstance()

setInstance() 

setInstance

sets the instance parameter, if numeric value is 0 then set to 1