Inheritance diagram for SeekableIterator:


Public Member Functions | |
| current () | |
| key () | |
| next () | |
| rewind () | |
| seek ($index) | |
| valid () | |
Definition at line 21 of file seekableiterator.inc.
| Iterator::current | ( | ) | [inherited] |
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 | ( | ) | [inherited] |
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 | ( | ) | [inherited] |
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 | ( | ) | [inherited] |
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.
| SeekableIterator::seek | ( | $ | index | ) |
Seek to an absolute position.
| $index | position to seek to |
function seek($index); $this->rewind(); $position = 0; while($position < $index && $this->valid()) { $this->next(); $position++; } if (!$this->valid()) { throw new OutOfBoundsException('Invalid seek position'); } }
Implemented in ArrayIterator, and SplFileObject.
| Iterator::valid | ( | ) | [inherited] |
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.
1.5.2