diff options
author | SVN Migration <svn@php.net> | 2005-06-10 18:06:44 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2005-06-10 18:06:44 +0000 |
commit | 02889a1980340caaa4f2450c834da87fb675f848 (patch) | |
tree | 2e0b0f07f6810a635d5ecba89f63b6bfb63126f8 /ext/spl/internal/infiniteiterator.inc | |
parent | 3b1f8e9ad74ad07580e4248b39fd0db261c31aa0 (diff) | |
download | php-git-php-5.0.1b1.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_0_1b1'.php-5.0.1b1
Diffstat (limited to 'ext/spl/internal/infiniteiterator.inc')
-rwxr-xr-x | ext/spl/internal/infiniteiterator.inc | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/ext/spl/internal/infiniteiterator.inc b/ext/spl/internal/infiniteiterator.inc deleted file mode 100755 index 3d97b903b1..0000000000 --- a/ext/spl/internal/infiniteiterator.inc +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -/** @file infiniteiterator.inc - * @ingroup SPL - * @brief class InfiniteIterator - * @author Marcus Boerger - * @date 2003 - 2005 - * - * SPL - Standard PHP Library - */ - -/** @ingroup SPL - * @brief An infinite Iterator - * @author Marcus Boerger - * @version 1.1 - * @since PHP 5.1 - * - * This Iterator takes another Iterator and infinitvely iterates it by - * rewinding it when its end is reached. - * - * \note Even an InfiniteIterator stops if its inner Iterator is empty. - * - \verbatim - $it = new ArrayIterator(array(1,2,3)); - $infinite = new InfiniteIterator($it); - $limit = new LimitIterator($infinite, 0, 5); - foreach($limit as $val=>$key) - { - echo "$val=>$key\n"; - } - \endverbatim - */ -class InfiniteIterator extends IteratorIterator -{ - /** Move the inner Iterator forward to its next element or rewind it. - * @return void - */ - function next() - { - $this->getInnerIterator()->next(); - if (!$this->getInnerIterator()->valid()) - { - $this->getInnerIterator()->rewind(); - } - } -} - -?>
\ No newline at end of file |