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 = $oldPosition;
throw new OutOfBoundsException( 'Invalid seek position (' . $position . ')' );
}
}