From: Marcus Boerger Date: Sun, 31 Oct 2004 15:36:08 +0000 (+0000) Subject: - Update X-Git-Tag: RELEASE_0_2~790 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6166a4a49d3bd905017712f6e2837afc569c6359;p=php - Update --- diff --git a/ext/spl/examples/norewinditerator.inc b/ext/spl/examples/norewinditerator.inc index cdd030c990..dbf69c5531 100755 --- a/ext/spl/examples/norewinditerator.inc +++ b/ext/spl/examples/norewinditerator.inc @@ -12,47 +12,17 @@ /** @ingroup Examples * @brief An Iterator that doesn't call rewind * @author Marcus Boerger - * @version 1.0 + * @version 1.1 * */ -class NoRewindIterator implements OuterIterator +class NoRewindIterator extends IteratorIterator { - protected $it; - - function __construct(Iterator $it) - { - $this->it = $it; - } - + /** Simply prevent execution of inner iterators rewind(). + */ function rewind() { // nothing to do } - - function valid() - { - return $this->getInnerIterator()->valid(); - } - - function current() - { - return $this->getInnerIterator()->current(); - } - - function key() - { - return $this->getInnerIterator()->key(); - } - - function next() - { - $this->getInnerIterator()->next(); - } - - function getInnerIterator() - { - return $this->it; - } } ?> \ No newline at end of file