Iterator Interface Reference
[Zend engine classes]

Basic iterator. More...

Inheritance diagram for Iterator:

Inheritance graph
{DbaReader\n|# $db\l- $key\l- $val\l|+ __construct()\l+ __destruct()\l+ current()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l- fetch_data()\l}{DirectoryIterator\n||+ __construct()\l+ __toString()\l+ current()\l+ isDot()\l+ isLink()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{DualIterator\n|+ CURRENT_0\l+ CURRENT_ARRAY\l+ CURRENT_LHS\l+ CURRENT_RHS\l+ DEFAULT_FLAGS\l+ KEY_0\l+ KEY_ARRAY\l+ KEY_LHS\l+ KEY_RHS\l- $flags\l- $lhs\l- $rhs\l|+ __construct()\l+ areEqual()\l+ areIdentical()\l+ current()\l+ getFlags()\l+ getLHS()\l+ getRHS()\l+ key()\l+ next()\l+ rewind()\l+ setFlags()\l+ valid()\l+ compareIterators()\l}{EmptyIterator\n||+ current()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{OuterIterator\n||+ getInnerIterator()\l}{RecursiveIterator\n||+ getChildren()\l+ hasChildren()\l}{SeekableIterator\n||+ seek()\l}{SplObjectStorage\n|- $index\l- $storage\l|+ attach()\l+ contains()\l+ count()\l+ current()\l+ detach()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{Traversable\n||}{DbaArray\n||+ __construct()\l+ __destruct()\l+ offsetExists()\l+ offsetGet()\l+ offsetSet()\l+ offsetUnset()\l}{RecursiveDirectoryIterator\n|+ x00000010\l+ x00000020\l+ x00000030\l|+ __construct()\l+ current()\l+ getChildren()\l+ getSubPath()\l+ getSubPathname()\l+ hasChildren()\l+ key()\l}{RecursiveDualIterator\n|- $ref\l|+ __construct()\l+ areEqual()\l+ areIdentical()\l+ getChildren()\l+ hasChildren()\l}{AppendIterator\n|- $iterators\l|+ __call()\l+ __construct()\l+ append()\l+ current()\l+ getInnerIterator()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{CachingIterator\n|+ CALL_TOSTRING\l+ CATCH_GET_CHILD\l+ TOSTRING_USE_CURRENT\l+ TOSTRING_USE_KEY\l- $current\l- $it\l- $key\l- $strValue\l- $valid\l|+ __call()\l+ __construct()\l+ __toString()\l+ current()\l+ getInnerIterator()\l+ hasNext()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{\< FilterIterator \>\n|- $it\l|+ __call()\l+ __construct()\l+ accept()\l+ current()\l+ getInnerIterator()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l# __clone()\l# fetch()\l}{IteratorIterator\n|- $iterator\l|+ __call()\l+ __construct()\l+ current()\l+ getInnerIterator()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{LimitIterator\n|- $count\l- $it\l- $offset\l- $pos\l|+ __call()\l+ __construct()\l+ current()\l+ getInnerIterator()\l+ getPosition()\l+ key()\l+ next()\l+ rewind()\l+ seek()\l+ valid()\l}{RecursiveIteratorIterator\n|+ CATCH_GET_CHILD\l+ CHILD_FIRST\l+ LEAVES_ONLY\l+ SELF_FIRST\l- $ait\l- $count\l- $flags\l- $mode\l|+ __construct()\l+ beginChildren()\l+ callGetChildren()\l+ callHasChildren()\l+ current()\l+ endChildren()\l+ getDepth()\l+ getInnerIterator()\l+ getSubIterator()\l+ key()\l+ next()\l+ nextElement()\l+ rewind()\l+ valid()\l- callNextElement()\l}{RecursiveCachingIterator\n|- $getChildren\l- $hasChildren\l|+ __construct()\l+ getChildren()\l+ hasChildren()\l+ rewind()\l}{CachingRecursiveIterator\n||}{InfiniteIterator\n||+ next()\l}{NoRewindIterator\n||+ rewind()\l}{DirectoryTree\n||+ __construct()\l}{DirectoryTreeIterator\n||+ __call()\l+ __construct()\l+ current()\l}{RecursiveCompareDualIterator\n|# $equal\l|+ __construct()\l+ areEqual()\l+ areIdentical()\l+ endChildren()\l+ rewind()\l}{RecursiveTreeIterator\n|+ $prefix\l+ BYPASS_CURRENT\l+ BYPASS_KEY\l- $rit_flags\l|+ __call()\l+ __construct()\l+ current()\l+ getEntry()\l+ getPostfix()\l+ getPrefix()\l+ key()\l}{DirectoryGraphIterator\n||+ __construct()\l}{RecursiveArrayIterator\n|- $ref\l|+ getChildren()\l+ hasChildren()\l}{\< RecursiveFilterIterator \>\n|- $ref\l|+ __construct()\l+ getChildren()\l+ hasChildren()\l}{RecursiveRegexIterator\n|- $ref\l|+ __construct()\l+ getChildren()\l+ hasChildren()\l}{SimpleXMLIterator\n||+ count()\l+ current()\l+ getChildren()\l+ hasChildren()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{SplFileObject\n|+ DROP_NEW_LINE\l- $delimiter\l- $enclosure\l- $flags\l- $fname\l- $fp\l- $line\l- $lnum\l- $max_len\l|+ __construct()\l+ __toString()\l+ current()\l+ eof()\l+ fflush()\l+ fgetc()\l+ fgetcsv()\l+ fgets()\l+ fgetss()\l+ flock()\l+ fpassthru()\l+ fscanf()\l+ fseek()\l+ fstat()\l+ ftell()\l+ ftruncate()\l+ fwrite()\l+ getChildren()\l+ getCsvControl()\l+ getCurrentLine()\l+ getFlags()\l+ getMaxLineLen()\l+ hasChildren()\l+ key()\l+ next()\l+ rewind()\l+ seek()\l+ setCsvControl()\l+ setFlags()\l+ setMaxLineLen()\l+ valid()\l- freeLine()\l- readLine()\l}{SubClasses\n||+ __construct()\l+ current()\l}{ArrayIterator\n|+ ARRAY_AS_PROPS\l+ STD_PROP_LIST\l|+ __construct()\l+ append()\l+ asort()\l+ count()\l+ current()\l+ getArrayCopy()\l+ getFlags()\l+ key()\l+ ksort()\l+ natcasesort()\l+ natsort()\l+ next()\l+ offsetExists()\l+ offsetGet()\l+ offsetSet()\l+ offsetUnset()\l+ rewind()\l+ seek()\l+ setFlags()\l+ uasort()\l+ uksort()\l+ valid()\l}
[legend]
Collaboration diagram for Iterator:

Collaboration graph
{Traversable\n||}
[legend]
List of all members.

Public Member Functions

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

Detailed Description

Basic iterator.

Since:
PHP 5.0
Interface for external iterators or objects that can be iterated themselves internally.

Note:
This is an engine internal interface.

Definition at line 535 of file spl.php.


Member Function Documentation

Iterator::current (  ) 

Return the current element.

Implemented in ArrayIterator, DirectoryIterator, RecursiveDirectoryIterator, SimpleXMLIterator, SubClasses, DbaReader, DirectoryTreeIterator, DualIterator, RecursiveTreeIterator, AppendIterator, CachingIterator, EmptyIterator, < FilterIterator >, IteratorIterator, LimitIterator, RecursiveIteratorIterator, SplFileObject, and SplObjectStorage.

Iterator::key (  ) 

Return the key of the current element.

Implemented in ArrayIterator, DirectoryIterator, RecursiveDirectoryIterator, SimpleXMLIterator, DbaReader, DualIterator, RecursiveTreeIterator, AppendIterator, CachingIterator, EmptyIterator, < FilterIterator >, IteratorIterator, LimitIterator, RecursiveIteratorIterator, SplFileObject, and SplObjectStorage.

Iterator::next (  ) 

Move forward to next element.

Implemented in ArrayIterator, DirectoryIterator, SimpleXMLIterator, DbaReader, DualIterator, AppendIterator, CachingIterator, EmptyIterator, < FilterIterator >, InfiniteIterator, IteratorIterator, LimitIterator, RecursiveIteratorIterator, SplFileObject, and SplObjectStorage.

Iterator::rewind (  ) 

Rewind the Iterator to the first element.

Implemented in ArrayIterator, DirectoryIterator, SimpleXMLIterator, DbaReader, DualIterator, RecursiveCompareDualIterator, AppendIterator, CachingIterator, EmptyIterator, < FilterIterator >, IteratorIterator, LimitIterator, NoRewindIterator, RecursiveCachingIterator, RecursiveIteratorIterator, SplFileObject, and SplObjectStorage.

Iterator::valid (  ) 

Check if there is a current element after calls to rewind() or next().

Implemented in ArrayIterator, DirectoryIterator, SimpleXMLIterator, DbaReader, DualIterator, AppendIterator, CachingIterator, EmptyIterator, < FilterIterator >, IteratorIterator, LimitIterator, RecursiveIteratorIterator, SplFileObject, and SplObjectStorage.


The documentation for this interface was generated from the following file:
Generated on Thu Apr 26 01:06:12 2007 for SPL-StandardPHPLibrary by  doxygen 1.5.2