Class Pager
Core utility for pagination
Methods summary
public
|
#
__construct( string $pageQueryStr = '' )
Constructor
Parameters
- $pageQueryStr
- The customized page query string name
|
public
object
|
#
set( string $key, mixed $value = '' )
Setter functions for the properties
Setter functions for the properties
Parameters
- $key
- The property name
- $value
- The value to be set to the property
Returns
object Pager
|
public
mixed
|
#
get( string $key )
Getter functions for the properties
Getter functions for the properties
Parameters
Returns
mixed The value of the property
|
public
object
|
#
calculate( )
Pager calculation function
Before calling this function, the following property must be set:
Pager calculation function
Before calling this function, the following property must be set:
- $page
- $itemsPerPage
- $pageNumLimit
- $total
The array of the offsets Array( [offset] => xx [thisPage] => xx [beforePages] => Array() [afterPages] => Array() [firstPageEnable] => xx [prePageEnable] => xx [nextPageNo] => xx [nextPageEnable] => xx [lastPageNo] => xx [lastPageEnable] => xx )
Returns
object Pager
|
public
|
#
display( callable $callback = null )
Display the pagination
Parameters
- $callback
- The callback function for customized display
|