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

Class: Pager

Source Location: /Pager-2.2.6/Pager.php

Class Overview


Pager - Wrapper class for [Sliding|Jumping]-window Pager


Author(s):

Version:

  • $Id: Pager.php,v 1.15 2004/09/08 16:33:06 quipo Exp $

Methods


Inherited Variables

Inherited Methods


Class Details

[line 53]
Pager - Wrapper class for [Sliding|Jumping]-window Pager

Usage examples can be found in the doc provided



[ Top ]


Method Detail

Pager (Constructor)   [line 134]

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

Constructor

------------------------------------------------------------------------- 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
  • 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
  • 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

Parameters:

mixed   $options     An associative array of option names and their values.

[ Top ]

factory   [line 161]

object Object &factory( [string $options = array()])

Return a pager based on $mode and $options
  • Return: Storage object
  • Static: This method can be called statically
  • Access: public

Parameters:

string   $options     Optional parameters for the storage class

[ Top ]


Documentation generated on Fri, 4 Feb 2005 05:20:12 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.