cvs: php-src /ext/spl/examples norewinditerator.inc
| From: | Marcus Boerger | Date: | Sun, 31 Oct 2004 15:36:08 +0000 |
| Subject: | cvs: php-src /ext/spl/examples norewinditerator.inc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-29066@lists.php.net to get a copy of this message | ||
helly Sun Oct 31 10:36:08 2004 EDT
Modified files:
/php-src/ext/spl/examples norewinditerator.inc
Log:
- Update
http://cvs.php.net/diff.php/php-src/ext/spl/examples/norewinditerator.inc?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/spl/examples/norewinditerator.inc
diff -u php-src/ext/spl/examples/norewinditerator.inc:1.3
php-src/ext/spl/examples/norewinditerator.inc:1.4
--- php-src/ext/spl/examples/norewinditerator.inc:1.3 Fri Oct 8 17:12:15 2004
+++ php-src/ext/spl/examples/norewinditerator.inc Sun Oct 31 10:36:08 2004
@@ -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