Phpfox_Pager

Description

Pagination This class handles all the pagination on the site and creates a template variable that is automatically picked up with a simple HTML variable call.

  • author: Raymond Benc
  • version: $Id: pager.class.php 1687 2010-07-22 03:13:27Z Raymond_Benc $
  • copyright: [PHPFOX_COPYRIGHT]

Located in /include/library/phpfox/pager/pager.class.php (line 19)


	
			
Variable Summary
 unknown_type $_aParams
 int $_iPage
 string $_sAjax
 string $_sUrlKey
Method Summary
 Phpfox_Pager __construct ()
 int getLastPage ()
 int getNextPage ()
 int getOffset (int $iPage, int $iPageSize, int $iCnt)
 int getTotalPages ()
 void set ([array $aParams = array()])
 array _getInfo (Url $oUrl)
 array _getPos ()
Variables
unknown_type $_aParams = array() (line 75)

Params to pass along with the pagination request.

  • access: private
int $_iFirstRow (line 47)

From page number.

  • access: private
int $_iFrameSize = 5 (line 61)

Numbers to display in the pagination frame.

  • access: private
int $_iLastRow (line 54)

Last page number.

  • access: private
int $_iPage = 0 (line 26)

Current page we are on.

  • access: private
int $_iPagesCount = 0 (line 40)

Total pages.

  • access: private
int $_iPageSize = 0 (line 33)

Total items per page.

  • access: private
string $_sAjax (line 68)

AJAX request call.

  • access: private
string $_sUrlKey = 'page' (line 82)

URL key for page param e.g. in http://example.com/?page=3 it is 'page'

  • access: private
Methods
Constructor __construct (line 88)

Class constructor.

  • access: public
Phpfox_Pager __construct ()
getCurrentPage (line 139)

Get the current page we are on.

  • access: public
int getCurrentPage ()
getLastPage (line 159)

Get the number of the last page.

  • access: public
int getLastPage ()
getNextPage (line 149)

Get the number of the next page.

  • access: public
int getNextPage ()
getOffset (line 172)

Get offset for given page (fix page number if needed)

  • return: offset of LIMIT in SQL
  • access: public
int getOffset (int $iPage, int $iPageSize, int $iCnt)
  • int $iPage: page number
  • int $iPageSize: page size (rows per page)
  • int $iCnt: records number
getTotalPages (line 129)

Get the number of total pages.

  • access: public
int getTotalPages ()
set (line 97)

Set all variables and build the pagination enviroment for this specific page.

  • access: public
void set ([array $aParams = array()])
  • array $aParams: ARRAY of params.
_getInfo (line 215)

Returns paging info: 'totalPages', 'totalRows', 'current', 'fromRow','toRow', 'firstUrl', 'prevUrl', 'nextUrl', 'lastUrl', 'urls' (url=>page)

  • return: paging info
  • access: private
array _getInfo (Url $oUrl)
  • Url $oUrl: page url
_getPos (line 189)

Calculates first/last page in a current frame

  • return: ($nStart, $nEnd)
  • access: private
array _getPos ()

Documentation generated on Tue, 28 Sep 2010 10:36:42 +0200 by phpDocumentor 1.4.0a2