Public Member Functions | |
reset () | |
isValid () | |
& | next () |
index () | |
& | value () |
key () | |
remove () |
This class provides common methods for Iterator objects.
An iterator is a 'pointer' to a data item extracted from some collection of resources.
The aim of Iterator is to allow some abstraction between your program resources and the way you fetch these resources.
Thus, you can loop over a file content and later replace this file with a database backend whithout changing the program logic.
Definition at line 60 of file Iterator.php.
|
Retrieve the current item index.
Reimplemented in PHPTAL_DBResultIterator, and ArrayIterator. Definition at line 103 of file Iterator.php. Referenced by key(). |
|
Test if current item is not the end of iterator.
Reimplemented in PHPTAL_DBResultIterator, and ArrayIterator. Definition at line 79 of file Iterator.php. |
|
(optional) Additional index for hashes.
Definition at line 127 of file Iterator.php. References index(). |
|
Iterate on the next element and returns the next item.
Reimplemented in PHPTAL_DBResultIterator, and ArrayIterator. Definition at line 89 of file Iterator.php. |
|
(optional) Remove the current value from container. Implement this method only when the iterator can do a secured remove without breaking other iterators works. Reimplemented in ArrayIterator. Definition at line 138 of file Iterator.php. |
|
Reset iterator to first item. This method should throw an exception for once only iterators.
Reimplemented in PHPTAL_DBResultIterator, and ArrayIterator. Definition at line 69 of file Iterator.php. |
|
Retrieve current item value.
Reimplemented in PHPTAL_DBResultIterator, and ArrayIterator. Definition at line 113 of file Iterator.php. |