PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TPagedDataSource

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 setDataSource DataSource. Only the items within the specified page will be returned and traversed.

TComponent
Extended by TPagedDataSource implements IteratorAggregate, Countable
Package: System\Collections
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Collections/TPagedDataSource.php
Methods summary
public mixed
# getDataSource( )

Returns

mixed
original data source. Defaults to null.
public
# setDataSource( mixed $value )

Parameters

$value
mixed
original data source
public integer
# getPageSize( )

Returns

integer
number of items in each page. Defaults to 10.
public
# setPageSize( integer $value )

Parameters

$value
integer
number of items in each page
public integer
# getCurrentPageIndex( )

Returns

integer
current page index. Defaults to 0.
public
# setCurrentPageIndex( integer $value )

Parameters

$value
integer
current page index
public boolean
# getAllowPaging( )

Returns

boolean
whether to allow paging. Defaults to false.
public
# setAllowPaging( boolean $value )

Parameters

$value
boolean
whether to allow paging
public boolean
# getAllowCustomPaging( )

Returns

boolean
whether to allow custom paging. Defaults to false.
public
# setAllowCustomPaging( boolean $value )

Parameters

$value
boolean
whether to allow custom paging
public integer
# getVirtualItemCount( )

Returns

integer
user-assigned number of items in data source Defaults to 0.
public
# setVirtualItemCount( integer $value )

Parameters

$value
integer
user-assigned number of items in data source
public integer
# getCount( )

Returns

integer
number of items in current page
public integer
# count( )

Returns the number of items in the current page. This method is required by Countable interface.

Returns the number of items in the current page. This method is required by Countable interface.

Returns

integer
number of items in the current page.

Implementation of

Countable::count()
public integer
# getPageCount( )

Returns

integer
number of pages
public boolean
# getIsFirstPage( )

Returns

boolean
whether the current page is the first page Defaults to false.
public boolean
# getIsLastPage( )

Returns

boolean
whether the current page is the last page
public integer
# getFirstIndexInPage( )

Returns

integer
the index of the item in data source, where the item is the first in current page
public integer
# getDataSourceCount( )

Returns

integer
number of items in data source, if available
public Iterator
# getIterator( )

Returns

Iterator
iterator

Implementation of

IteratorAggregate::getIterator()
Methods inherited from TComponent
__call(), __construct(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO