[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Collections/ -> TDummyDataSource.php (sommaire)

TDummyDataSource, TDummyDataSourceIterator classes

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TDummyDataSource.php 1397 2006-09-07 07:55:53Z wei $
Poids: 147 lignes (3 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 2 classes

TDummyDataSource:: (4 méthodes):
  __construct()
  getCount()
  getIterator()
  count()

TDummyDataSourceIterator:: (6 méthodes):
  __construct()
  rewind()
  key()
  current()
  next()
  valid()


Classe: TDummyDataSource  - X-Ref

TDummyDataSource class

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 <b>foreach</b>
PHP statement like the following,
<code>
foreach($dummyDataSource as $dataItem)
</code>

__construct($count)   X-Ref
Constructor.

param: integer number of (virtual) items in the data source.

getCount()   X-Ref

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

getIterator()   X-Ref

return: Iterator iterator

count()   X-Ref
Returns the number of (virtual) items in the data source.
This method is required by Countable interface.

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

Classe: TDummyDataSourceIterator  - X-Ref

TDummyDataSourceIterator class

TDummyDataSourceIterator implements Iterator interface.

TDummyDataSourceIterator is used by {@link TDummyDataSource}.
It allows TDummyDataSource to return a new iterator
for traversing its dummy items.

__construct($count)   X-Ref
Constructor.

param: integer number of (virtual) items in the data source.

rewind()   X-Ref
Rewinds internal array pointer.
This method is required by the interface Iterator.


key()   X-Ref
Returns the key of the current array item.
This method is required by the interface Iterator.

return: integer the key of the current array item

current()   X-Ref
Returns the current array item.
This method is required by the interface Iterator.

return: mixed the current array item

next()   X-Ref
Moves the internal pointer to the next array item.
This method is required by the interface Iterator.


valid()   X-Ref
Returns whether there is an item at current position.
This method is required by the interface Iterator.

return: boolean



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7