helly           Sun Sep  4 14:51:52 2005 EDT

  Modified files:              
    /php-src/ext/spl/internal   recursivefilteriterator.inc 
  Log:
  - Update docu
  
http://cvs.php.net/diff.php/php-src/ext/spl/internal/recursivefilteriterator.inc?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/spl/internal/recursivefilteriterator.inc
diff -u php-src/ext/spl/internal/recursivefilteriterator.inc:1.2 
php-src/ext/spl/internal/recursivefilteriterator.inc:1.3
--- php-src/ext/spl/internal/recursivefilteriterator.inc:1.2    Fri Sep  2 
15:15:30 2005
+++ php-src/ext/spl/internal/recursivefilteriterator.inc        Sun Sep  4 
14:51:50 2005
@@ -33,7 +33,6 @@
         */
        function __construct(RecursiveIterator $it)
        {
-               $this->ref = new ReflectionClass($this);
                parent::__construct($it);
        }
        
@@ -44,10 +43,16 @@
                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());
        }
        

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to