[ class tree: Pager ] [ index: Pager ] [ all elements ]

Class: Pager

Source Location: /Pager-2.5.1/Pager.php

Class Overview

Pager - Wrapper class for [Sliding|Jumping]-window Pager Usage examples can be found in the PEAR manual



  • 2003-2008 Lorenzo Alberton, Richard Heyes


Inherited Variables

Inherited Methods

Class Details

[line 52]
Pager - Wrapper class for [Sliding|Jumping]-window Pager Usage examples can be found in the PEAR manual

[ Top ]

Method Detail

__construct (Constructor)   [line 141]

Pager __construct( [mixed $options = array()])


------------------------------------------------------------------------- VALID options are (default values are set some lines before):

  • mode (string): "Jumping" or "Sliding" -window - It determines pager behaviour. See the manual for more details
  • totalItems (int): # of items to page.
  • perPage (int): # of items per page.
  • delta (int): # of page #s to show before and after the current one
  • linkClass (string): name of CSS class used for link styling.
  • append (bool): if true pageID is appended as GET value to the URL - if false it is embedded in the URL according to "fileName" specs
  • httpMethod (string): Specifies the HTTP method to use. Valid values are 'GET' or 'POST' according to "fileName" specs
  • importQuery (bool): if true (default behaviour), variables and values are imported from the submitted data (query string) and used in the generated links otherwise they're ignored completely
  • path (string): complete path to the page (without the page name)
  • fileName (string): name of the page, with a %d if append=true
  • urlVar (string): name of pageNumber URL var, for example "pageID"
  • altPrev (string): alt text to display for prev page, on prev link.
  • altNext (string): alt text to display for next page, on next link.
  • altPage (string): alt text to display before the page number.
  • prevImg (string): sth (it can be text such as "<< PREV" or an <img/> as well...) to display instead of "<<".
  • nextImg (string): same as prevImg, used for NEXT link, instead of the default value, which is ">>".
  • separator (string): what to use to separate numbers (can be an <img/>, a comma, an hyphen, or whatever.
  • spacesBeforeSeparator (int): number of spaces before the separator.
  • firstPagePre (string): string used before first page number (can be an <img/>, a "{", an empty string, or whatever.
  • firstPageText (string): string used in place of first page number
  • firstPagePost (string): string used after first page number (can be an <img/>, a "}", an empty string, or whatever.
  • lastPagePre (string): similar to firstPagePre.
  • lastPageText (string): similar to firstPageText.
  • lastPagePost (string): similar to firstPagePost.
  • spacesAfterSeparator (int): number of spaces after the separator.
  • firstLinkTitle (string): string used as title in <link rel="first"> tag
  • lastLinkTitle (string): string used as title in <link rel="last"> tag
  • prevLinkTitle (string): string used as title in <link rel="prev"> tag
  • nextLinkTitle (string): string used as title in <link rel="next"> tag
  • curPageLinkClassName (string): name of CSS class used for current page link.
  • clearIfVoid(bool): if there's only one page, don't display pager.
  • extraVars (array): additional URL vars to be added to the querystring
  • excludeVars (array): URL vars to be excluded in the querystring
  • itemData (array): array of items to page.
  • useSessions (bool): if true, number of items to display per page is stored in the $_SESSION[$_sessionVar] var.
  • closeSession (bool): if true, the session is closed just after R/W.
  • sessionVar (string): name of the session var for perPage value. A value != from default can be useful when using more than one Pager istance in the page.
------------------------------------------------------------------------- REQUIRED options are:
  • fileName IF append==false (default is true)

  • Access: public


mixed   $options   —  Associative array of option names and their values

[ Top ]

factory   [line 169]

object Storage &factory( [array $options = array()])

Return a pager based on $mode and $options
  • Return: object
  • Access: public


array   $options   —  Optional parameters for the storage class

[ Top ]

Documentation generated on Mon, 19 Jun 2017 16:30:02 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.