cvs: php-src /ext/spl/internal recursivefilteriterator.inc

From: Date: Sun, 04 Sep 2005 18:51:52 +0000
Subject: cvs: php-src /ext/spl/internal recursivefilteriterator.inc
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-33798@lists.php.net to get a copy of this message
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()); }

« previous php.cvs (#33798) next »