## 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: $Revision: $ $Date: $
- author: Qiang Xue <qiang.xue@gmail.com>

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

    TComponent
       |
       --TPagedDataSource

Method Summary
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
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 235)

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

integer getDataSourceCount ()
getFirstIndexInPage (line 224)

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

integer getFirstIndexInPage ()
getIsFirstPage (line 201)

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

boolean getIsFirstPage ()
getIsLastPage (line 212)

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

boolean getIsLastPage ()
getIterator (line 248)

- return: iterator
- access: public

Iterator getIterator ()
getPageCount (line 188)

- 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::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> 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 Sun, 04 Jun 2006 18:59:59 -0400 by phpDocumentor 1.3.0RC4