XRL  latest
Simple XML-RPC Library (both client and server)
Iterator Interface Reference

Interface for external iterators or objects that can be iterated themselves internally. More...

+ Inheritance diagram for Iterator:

Public Member Functions

 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 

Detailed Description

Interface for external iterators or objects that can be iterated themselves internally.

See also
http://php.net/class.iterator.php

Definition at line 11 of file Iterator.php.

Member Function Documentation

Iterator::current ( )

Returns the current element.

Return values
mixedCurrent element.
See also
http://php.net/iterator.current.php

Implemented in fpoirotte\XRL\Types\AbstractCollection.

Iterator::key ( )

Returns the key of the current element.

Return values
scalarReturns scalar on success, or null on failure.
Note
Issues E_NOTICE on failure.
See also
http://php.net/iterator.key.php

Implemented in fpoirotte\XRL\Types\ArrayType, and fpoirotte\XRL\Types\Struct.

Referenced by fpoirotte\XRL\Types\AbstractCollection\current().

Iterator::next ( )

Moves the current position to the next element.

Note
This method is called after each foreach loop.
See also
http://php.net/iterator.next.php

Implemented in fpoirotte\XRL\Types\AbstractCollection.

Iterator::rewind ( )

Rewinds back to the first element of the Iterator.

Note
This is the first method called when starting a foreach loop. It will not be executed after foreach loops.
See also
http://php.net/iterator.rewind.php

Implemented in fpoirotte\XRL\Types\AbstractCollection.

Iterator::valid ( )

Checks if current position is valid.

This method is called after Iterator::rewind() and Iterator::next() to check if the current position is valid.

Return values
booltrue if the current position is valid, false otherwise.
Note
If Iterator::valid() returns false, the foreach loop will be terminated.
See also
http://php.net/iterator.valid.php

Implemented in fpoirotte\XRL\Types\AbstractCollection.


The documentation for this interface was generated from the following file: