Object
|
--Iterator
|
--ListIterator
Classes extended from ListIterator:
class ArrayIterator
This class will iterate over an array, index by index.
The usage for this class would probably be seen best in the following:
$iter = new ArrayIterator(array( 1, 2, 4, 5, 6, 7, 9 ));
for($i = $iter->reset(); $i < $iter->end(); $i = $iter->next())
{
echo $iter->current();
}
or
$iter = new ListIterator(array(1, 2, 3, 4, 5, 6));
while( $iter->hasNext() )
{
echo $iter->current();
}
iterator$Revision: 0.1 $ $Date: 2003/03/29 $Japha 1.0
@Ryan Gantt
@Value current()
boolean hasNext()
boolean hasPrevious()
int next()
int previous()
void __construct()
Returns the value of the array at the current index
of Array at the current index
@
public
Checks if the next index in the current array exists
true iff there is another element in the list
public
Checks if the previous index in the current array exists
true iff there is a previous element in the list
public
Overrides: Iterator::next()
Iterates to the next index in the array
the next index of the list
public
Moves the iterator once character backwords on the String
the previous element
public
Takes the array as a parameter, and initilizes all of the variables e.g.// length, end, reset
public