Jeff PHP framework  0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
pagination Class Reference

class used to manage paging of lists or content More...

Public Member Functions

 __construct ($ifp, $tot, $opts=null)
 actual ()
 Returns the current page number.
 limit ()
 Returns the key of the last item of the current page.
 navigation ()
 Navigation links.
 start ()
 Returns the key of the first item of the current page.
 summary ()
 Pagination summary.
 total ()
 Returns the total number of items.

Private Attributes

 $_actual
 current page number
 $_end
 last element index of the current page
 $_last
 last page number
 $_npages
 number of pages displayed next to the current page in the page navigation
 $_range
 elements for page
 $_start
 first element index of the current page
 $_tot
 total number of items
 $_urlp
 get parameter used to pass page number
 $_view
 a view instance

Detailed Description

class used to manage paging of lists or content

Author:
abidibo abidi.nosp@m.bo@g.nosp@m.mail..nosp@m.com
Version:
0.99
Date:
2011-2012

Definition at line 21 of file pagination.class.php.


Constructor & Destructor Documentation

pagination::__construct ( ifp,
tot,
opts = null 
)

Constructs a pagination instance

Parameters:
int$ifpitems for page
int$tottotal number of items
array$optsAsociative array of options:
  • urlp: string default 'p'. The get parameter used to pass page values
  • npages: int default 2. number of pages displayed next to the current page in the page navigation
  • permalink: bool default true. Whether to use permalinks whene generating the page navigation links
Returns:
void

Definition at line 80 of file pagination.class.php.

+ Here is the call graph for this function:


Member Function Documentation

Returns the current page number.

Returns:
int current page number

Definition at line 104 of file pagination.class.php.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Returns the key of the last item of the current page.

Returns:
int last item key

Definition at line 139 of file pagination.class.php.

+ Here is the call graph for this function:

Navigation links.

public

Returns:
string page navigation

Definition at line 171 of file pagination.class.php.

+ Here is the call graph for this function:

Returns the key of the first item of the current page.

Returns:
int first item key

Definition at line 116 of file pagination.class.php.

+ Here is the caller graph for this function:

Pagination summary.

Returns something like 'items 5-20 of 200'

public

Returns:
string pagination summary

Definition at line 153 of file pagination.class.php.

Returns the total number of items.

Returns:
int total number of items

Definition at line 128 of file pagination.class.php.


Field Documentation

current page number

Definition at line 41 of file pagination.class.php.

pagination::$_end [private]

last element index of the current page

Definition at line 56 of file pagination.class.php.

pagination::$_last [private]

last page number

Definition at line 46 of file pagination.class.php.

number of pages displayed next to the current page in the page navigation

Definition at line 66 of file pagination.class.php.

elements for page

Definition at line 31 of file pagination.class.php.

first element index of the current page

Definition at line 51 of file pagination.class.php.

pagination::$_tot [private]

total number of items

Definition at line 61 of file pagination.class.php.

pagination::$_urlp [private]

get parameter used to pass page number

Definition at line 36 of file pagination.class.php.

pagination::$_view [private]

a view instance

Definition at line 26 of file pagination.class.php.


The documentation for this class was generated from the following file: