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

Class: Pager_Sliding

Source Location: /Pager-2.2.6/Sliding.php

Class Overview

Pager_Common
   |
   --Pager_Sliding

Pager_Sliding - Generic data paging class ("sliding window" style)


Author(s):

Version:

  • $Id: Sliding.php,v 1.5 2004/01/16 10:29:57 quipo Exp $

Methods


Inherited Variables

Inherited Methods

Class: Pager_Common

Pager_Common::errorMessage()
Return a textual error message for a PAGER error code
Pager_Common::getCurrentPageID()
Returns ID of current page
Pager_Common::getLinks()
Returns back/next/first/last and page links, both as ordered and associative array.
Pager_Common::getNextPageID()
Returns next page ID. If current page is last page this function returns FALSE
Pager_Common::getOffsetByPageId()
Returns offsets for given pageID. Eg, if you pass it pageID one and your perPage limit is 10 it will return (1, 10). PageID of 2 would give you (11, 20).
Pager_Common::getPageData()
Returns an array of current pages data
Pager_Common::getPageIdByOffset()
Returns pageID for given offset
Pager_Common::getPageRangeByPageId()
Pager_Common::getPerPageSelectBox()
Returns a string with a XHTML SELECT menu,
Pager_Common::getPreviousPageID()
Returns previous page ID. If current page is first page this function returns FALSE
Pager_Common::isFirstPage()
Returns whether current page is first page
Pager_Common::isLastPage()
Returns whether current page is last page
Pager_Common::isLastPageComplete()
Returns whether last page is complete
Pager_Common::numItems()
Returns number of items
Pager_Common::numPages()
Returns number of pages

Class Details

[line 36]
Pager_Sliding - Generic data paging class ("sliding window" style)

Usage examples can be found in the doc provided

  • Version: $Id: Sliding.php,v 1.5 2004/01/16 10:29:57 quipo Exp $
  • Author: Lorenzo Alberton <at quipo.it>


[ Top ]


Method Detail

Pager_Sliding (Constructor)   [line 47]

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

Constructor
  • Access: public

Parameters:

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

[ Top ]

getLinks   [line 145]

array getLinks( [integer $pageID = null])

Returns back/next/first/last and page links, both as ordered and associative array.
  • Return: back/pages/next/first/last/all links
  • Access: public

Overrides Pager_Common::getLinks() (Returns back/next/first/last and page links, both as ordered and associative array.)

Parameters:

integer   $pageID     Optional pageID. If specified, links for that page are provided instead of current one.

[ Top ]

getPageIdByOffset   [line 94]

void getPageIdByOffset( [integer $index = null])

"Overload" PEAR::Pager method. VOID. Not needed here...
  • Access: public
  • Deprecated:

Overrides Pager_Common::getPageIdByOffset() (Returns pageID for given offset)

Parameters:

integer   $index     Offset to get pageID for

[ Top ]

getPageRangeByPageId   [line 111]

array getPageRangeByPageId( [integer $pageid = null])

Given a PageId, it returns the limits of the range of pages displayed.

While getOffsetByPageId() returns the offset of the data within the current page, this method returns the offsets of the page numbers interval. E.g., if you have pageId=5 and delta=2, it will return (3, 7). PageID of 9 would give you (4, 8). If the method is called without parameter, pageID is set to currentPage#.

  • Return: First and last offsets
  • Access: public

Overrides Pager_Common::getPageRangeByPageId() (parent method not documented)

Parameters:

integer   $pageid     PageID to get offsets for

[ Top ]


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