PHP Class Prado\Collections\TPagedDataSource

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 {@link setDataSource DataSource}. Only the items within the specified page will be returned and traversed.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\TComponent, implements IteratorAggregate, implements Countable
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

Méthode Description
count ( ) : integer Returns the number of items in the current page.
getAllowCustomPaging ( ) : boolean
getAllowPaging ( ) : boolean
getCount ( ) : integer
getCurrentPageIndex ( ) : integer
getDataSource ( ) : mixed
getDataSourceCount ( ) : integer
getFirstIndexInPage ( ) : integer
getIsFirstPage ( ) : boolean
getIsLastPage ( ) : boolean
getIterator ( ) : Iterator
getPageCount ( ) : integer
getPageSize ( ) : integer
getVirtualItemCount ( ) : integer
setAllowCustomPaging ( $value )
setAllowPaging ( $value )
setCurrentPageIndex ( $value )
setDataSource ( $value )
setPageSize ( $value )
setVirtualItemCount ( $value )

Method Details

count() public méthode

This method is required by \Countable interface.
public count ( ) : integer
Résultat integer number of items in the current page.

getAllowCustomPaging() public méthode

public getAllowCustomPaging ( ) : boolean
Résultat boolean whether to allow custom paging. Defaults to false.

getAllowPaging() public méthode

public getAllowPaging ( ) : boolean
Résultat boolean whether to allow paging. Defaults to false.

getCount() public méthode

public getCount ( ) : integer
Résultat integer number of items in current page

getCurrentPageIndex() public méthode

public getCurrentPageIndex ( ) : integer
Résultat integer current page index. Defaults to 0.

getDataSource() public méthode

public getDataSource ( ) : mixed
Résultat mixed original data source. Defaults to null.

getDataSourceCount() public méthode

public getDataSourceCount ( ) : integer
Résultat integer number of items in data source, if available

getFirstIndexInPage() public méthode

public getFirstIndexInPage ( ) : integer
Résultat integer the index of the item in data source, where the item is the first in current page

getIsFirstPage() public méthode

public getIsFirstPage ( ) : boolean
Résultat boolean whether the current page is the first page Defaults to false.

getIsLastPage() public méthode

public getIsLastPage ( ) : boolean
Résultat boolean whether the current page is the last page

getIterator() public méthode

public getIterator ( ) : Iterator
Résultat Iterator iterator

getPageCount() public méthode

public getPageCount ( ) : integer
Résultat integer number of pages

getPageSize() public méthode

public getPageSize ( ) : integer
Résultat integer number of items in each page. Defaults to 10.

getVirtualItemCount() public méthode

public getVirtualItemCount ( ) : integer
Résultat integer user-assigned number of items in data source Defaults to 0.

setAllowCustomPaging() public méthode

public setAllowCustomPaging ( $value )

setAllowPaging() public méthode

public setAllowPaging ( $value )

setCurrentPageIndex() public méthode

public setCurrentPageIndex ( $value )

setDataSource() public méthode

public setDataSource ( $value )

setPageSize() public méthode

public setPageSize ( $value )

setVirtualItemCount() public méthode

public setVirtualItemCount ( $value )