## Class TPagedDataSource

Description

Implements interfaces:

TPagedDataSource class

TPagedDataSource implements an integer-indexed collection class with paging functionality.

Data items in TPagedDataSource can be traversed using foreach PHP statement like the following,

     foreach($pagedDataSource as $dataItem)

The data are fetched from DataSource. Only the items within the specified page will be returned and traversed.

- since: 3.0
- version: $Id: TPagedDataSource.php 1398 2006-09-08 19:31:03Z xue $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Collections/TPagedDataSource.php (line 31)

    TComponent
       |
       --TPagedDataSource

Method Summary
integer count ()
boolean getAllowCustomPaging ()
boolean getAllowPaging ()
integer getCount ()
integer getCurrentPageIndex ()
mixed getDataSource ()
integer getDataSourceCount ()
integer getFirstIndexInPage ()
boolean getIsFirstPage ()
boolean getIsLastPage ()
Iterator getIterator ()
integer getPageCount ()
integer getPageSize ()
integer getVirtualItemCount ()
void setAllowCustomPaging (boolean $value)
void setAllowPaging (boolean $value)
void setCurrentPageIndex (integer $value)
void setDataSource (mixed $value)
void setPageSize (integer $value)
void setVirtualItemCount (integer $value)
Methods
count (line 190)

Returns the number of items in the current page.

This method is required by Countable interface.

- return: number of items in the current page.
- access: public

integer count ()
getAllowCustomPaging (line 139)

- return: whether to allow custom paging. Defaults to false.
- access: public

boolean getAllowCustomPaging ()
getAllowPaging (line 123)

- return: whether to allow paging. Defaults to false.
- access: public

boolean getAllowPaging ()
getCount (line 174)

- return: number of items in current page
- access: public

integer getCount ()
getCurrentPageIndex (line 105)

- return: current page index. Defaults to 0.
- access: public

integer getCurrentPageIndex ()
getDataSource (line 61)

- return: original data source. Defaults to null.
- access: public

mixed getDataSource ()
getDataSourceCount (line 245)

- return: number of items in data source, if available
- access: public

integer getDataSourceCount ()
getFirstIndexInPage (line 234)

- return: the index of the item in data source, where the item is the first in current page
- access: public

integer getFirstIndexInPage ()
getIsFirstPage (line 211)

- return: whether the current page is the first page Defaults to false.
- access: public

boolean getIsFirstPage ()
getIsLastPage (line 222)

- return: whether the current page is the last page
- access: public

boolean getIsLastPage ()
getIterator (line 258)

- return: iterator
- access: public

Iterator getIterator ()
getPageCount (line 198)

- return: number of pages
- access: public

integer getPageCount ()
getPageSize (line 86)

- return: number of items in each page. Defaults to 10.
- access: public

integer getPageSize ()
getVirtualItemCount (line 155)

- return: user-assigned number of items in data source Defaults to 0.
- access: public

integer getVirtualItemCount ()
setAllowCustomPaging (line 147)

- access: public

void setAllowCustomPaging (boolean $value)

- boolean $value: whether to allow custom paging

setAllowPaging (line 131)

- access: public

void setAllowPaging (boolean $value)

- boolean $value: whether to allow paging

setCurrentPageIndex (line 113)

- access: public

void setCurrentPageIndex (integer $value)

- integer $value: current page index

setDataSource (line 69)

- access: public

void setDataSource (mixed $value)

- mixed $value: original data source

setPageSize (line 94)

- access: public

void setPageSize (integer $value)

- integer $value: number of items in each page

setVirtualItemCount (line 163)

- access: public

void setVirtualItemCount (integer $value)

- integer $value: user-assigned number of items in data source

#### Inherited Methods

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Documentation generated on Mon, 21 Apr 2008 11:35:46 -0400 by phpDocumentor 1.3.0RC4