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

Class: Pager_Sliding

Source Location: /Pager-2.4.9/Pager/Sliding.php

Class Overview

Pager_Common
   |
   --Pager_Sliding

Pager_Sliding - Generic data paging class ("sliding window" style) Usage examples can be found in the PEAR manual


Author(s):

Copyright:

  • 2003-2008 Lorenzo Alberton

Methods


Inherited Variables

Inherited Methods

Class: Pager_Common

Pager_Common::build()
Generate or refresh the links and paged data after a call to setOptions()
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::getOption()
Return the current value of a given option
Pager_Common::getOptions()
Return an array with all the current pager options
Pager_Common::getPageData()
Returns an array of current pages data
Pager_Common::getPageIdByOffset()
Returns pageID for given offset
Pager_Common::getPageRangeByPageId()
Given a PageId, it returns the limits of the range of pages displayed.
Pager_Common::getPageSelectBox()
Returns a string with a XHTML SELECT menu with the page numbers, useful as an alternative to the links
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
Pager_Common::setOptions()
Set and sanitize options

Class Details

[line 55]
Pager_Sliding - Generic data paging class ("sliding window" style) Usage examples can be found in the PEAR manual


[ Top ]


Method Detail

Pager_Sliding (Constructor)   [line 66]

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

Constructor
  • Access: public

Parameters:

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

[ Top ]

getLinks   [line 154]

array getLinks( [integer $pageID = null], [string $dummy = ''])

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.
string   $dummy   —  used to comply with parent signature (leave empty)

[ Top ]

getPageIdByOffset   [line 98]

void getPageIdByOffset( integer $index)

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

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

Parameters:

integer   $index   —  Offset to get pageID for

[ Top ]

getPageRangeByPageId   [line 118]

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() (Given a PageId, it returns the limits of the range of pages displayed.)

Parameters:

integer   $pageid   —  PageID to get offsets for

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:57:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.