- Update docu

This commit is contained in:
Marcus Boerger 2005-03-01 23:44:05 +00:00
parent 0b3ed59fb6
commit f33adafab7
2 changed files with 13 additions and 5 deletions

View File

@ -25,17 +25,24 @@ interface SeekableIterator implements Iterator
* \param $index position to seek to
* \return void
*
* \note The method should throw an exception if it is not possible to
* seek to the given position.
*/
* The method should throw an exception if it is not possible to seek to
* the given position. Typically this exception should be of type
* OutOfBoundsException.
\code
function seek($index);
/* $this->rewind();
$this->rewind();
$position = 0;
while($position < $index && $this->valid()) {
$this->next();
$position++;
}
}*/
if (!$this->valid()) {
throw new OutOfBoundsException('Invalid seek position');
}
}
\endcode
*/
function seek($index);
}
?>

View File

@ -548,6 +548,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Countable
function getArrayCopy();
/** @param $position offset to seek to
* @throw OutOfBoundsException if $position is invalid
*/
function seek($position);