]> granicus.if.org Git - php/commitdiff
Add new example
authorMarcus Boerger <helly@php.net>
Fri, 8 Oct 2004 21:17:53 +0000 (21:17 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 8 Oct 2004 21:17:53 +0000 (21:17 +0000)
ext/spl/examples/recursivefilteriterator.inc [new file with mode: 0755]

diff --git a/ext/spl/examples/recursivefilteriterator.inc b/ext/spl/examples/recursivefilteriterator.inc
new file mode 100755 (executable)
index 0000000..f97afb0
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+/** @file norewinditerator.inc
+ * @ingroup Examples
+ * @brief class NoRewindIterator
+ * @author  Marcus Boerger
+ * @date    2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
+ * @brief   A recursive Filter
+ * @author  Marcus Boerger
+ * @version 1.0
+ *
+ */
+abstract class RecursiveFilterIterator extends FilterIterator implements RecursiveIterator
+{
+       function __construct(RecursiveIterator $it)
+       {
+               parent::__construct($it);
+       }
+       
+       function hasChildren()
+       {
+               return $this->getInnerIterator()->hasChildren();
+       }
+
+       function getChildren()
+       {
+               return $this->getInnerIterator()->getChildren();
+       }
+}
+
+?>
\ No newline at end of file