]> granicus.if.org Git - php/commitdiff
- Update docu
authorMarcus Boerger <helly@php.net>
Sun, 4 Sep 2005 18:51:50 +0000 (18:51 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 4 Sep 2005 18:51:50 +0000 (18:51 +0000)
ext/spl/internal/recursivefilteriterator.inc

index b1271aef876de2f2dd56b1735280201ffc88e1be..472af21edf22a6d38db73b8cd7a75f2d16e18d38 100755 (executable)
@@ -33,7 +33,6 @@ abstract class RecursiveFilterIterator extends FilterIterator implements Recursi
         */
        function __construct(RecursiveIterator $it)
        {
-               $this->ref = new ReflectionClass($this);
                parent::__construct($it);
        }
        
@@ -44,10 +43,16 @@ abstract class RecursiveFilterIterator extends FilterIterator implements Recursi
                return $this->getInnerIterator()->hasChildren();
        }
 
-       /** @return the ParentIterator for the current elements children
+       /** @return an iterator for the current elements children
+        *
+        * @note the returned iterator will be of the same class as $this
         */
        function getChildren()
        {
+               if (empty($this->ref))
+               {
+                       $this->ref = new ReflectionClass($this);
+               }
                return $this->ref->newInstance($this->getInnerIterator()->getChildren());
        }