PHP Class Prado\Collections\TDummyDataSource

TDummyDataSource implements a dummy data collection with a specified number of dummy data items. The number of virtual items can be set via {@link setCount Count} property. You can traverse it using foreach PHP statement like the following, foreach($dummyDataSource as $dataItem)
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\TComponent, implements IteratorAggregate, implements Countable
Mostra file Open project: pradosoft/prado

Public Methods

Method Description
__construct ( $count ) Constructor.
count ( ) : integer Returns the number of (virtual) items in the data source.
getCount ( ) : integer
getIterator ( ) : Iterator

Method Details

__construct() public method

Constructor.
public __construct ( $count )

count() public method

This method is required by \Countable interface.
public count ( ) : integer
return integer number of (virtual) items in the data source.

getCount() public method

public getCount ( ) : integer
return integer number of (virtual) items in the data source.

getIterator() public method

public getIterator ( ) : Iterator
return Iterator iterator