seekableiterator

PHP: Implementing the SeekableIterator interface...

I'm currently writing a class that implements the SeekableIterator interface and have run into a problem. I have two internal arrays that I am using and would like to allow for iteration through both of them from outside the class. Is there an easy way to do this without first merging the two arrays within the class? Here's a quick exam...

PHP: SeekableIterator::seek()

If I want to implement seek() to complete the SeekableIterator interface, should I internally revert to the old position if the seeked position is invalid? Like this: public function seek( $position ) { $oldPosition = $this->_position; $this->_position = $position; if( !$this->valid() ) { $this->_position = $oldP...