expPaginator

This is the class expPaginator Exponent Pagination Subsystem

The expPaginator class is used to retrieve objects from the database and paginate them and optionally group the by category. It automagically handles the calls to other pages and has built-in sorting using the defined column headers.

Usage Example:

$page = new expPaginator(array( 'model'=>'faq', 'where'=>1, 'limit'=>25, 'order'=>'rank', 'controller'=>$this->baseclassname, 'action'=>$this->params['action'], 'columns'=>array('In FAQ'=>'include_in_faq', 'Submitted'=>'created_at', 'Submitted By'=>'submitter_name'), ));

package

Subsystems

subpackage

Subsystems

Methods

expPaginator Constructor

__construct(array $params = array()) 

This is the main entry point for using the expPaginator. See example above.

Arguments

$params

array

Use this to set any of the class variables. Ones not passed will be set to a default.

exdoc Object/Array sorting comparison function -- sorts by a specified column in ascending order.

asc( $a,  $b) : integer
node

Subsystems:expPaginator

Arguments

$a

$b

Response

integer

cleanParams

cleanParams( $params) 

Arguments

$params

exdoc Object/Array sorting comparison function -- sorts by a specified column in descending order.

desc( $a,  $b) : integer
node

Subsystems:expPaginator

Arguments

$a

$b

Response

integer

makeHeaderCols

makeHeaderCols( $params) 

Arguments

$params

makeSortDropdown

makeSortDropdown( $params) 

Arguments

$params

runCallback

runCallback() 

Properties

model

model : 

Type(s)

search_string

search_string : 

Type(s)

sql

sql : 

Type(s)

count_sql

count_sql : 

Type(s)

where

where : 

Type(s)

controller

controller : 

Type(s)

action

action : 

Type(s)

order

order : 

Type(s)

order_direction

order_direction : 

Type(s)

firstpage

firstpage : 

Type(s)

lastpage

lastpage : 

Type(s)

previous_page

previous_page : 

Type(s)

next_page

next_page : 

Type(s)

previous_shift

previous_shift : 

Type(s)

next_shift

next_shift : 

Type(s)

header_columns

header_columns : 

Type(s)

default

default : 

Type(s)

view

view : 

Type(s)

uncat

uncat : 

Type(s)

page

page : 

Type(s)

limit

limit : 

Type(s)

start

start : 

Type(s)

last

last : 

Type(s)

pages_to_show

pages_to_show : 

Type(s)

total_records

total_records : 

Type(s)

total_pages

total_pages : 

Type(s)

page_offset

page_offset : 

Type(s)

categorize

categorize : 

Type(s)

pages

pages : 

Type(s)

records

records : 

Type(s)

cats

cats : 

Type(s)

sort_dropdown

sort_dropdown : 

Type(s)