diff options
author | Marcus Boerger <helly@php.net> | 2005-09-04 18:51:50 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2005-09-04 18:51:50 +0000 |
commit | 4cba6ac94d5bdc584f01af1ff3815ce4fd465009 (patch) | |
tree | d45c71c74edfbcd23b35d4969cc6414975596576 | |
parent | 856b81ff0cae80c0cbbd1e1089d6c5c761956023 (diff) | |
download | php-git-4cba6ac94d5bdc584f01af1ff3815ce4fd465009.tar.gz |
- Update docu
-rwxr-xr-x | ext/spl/internal/recursivefilteriterator.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/spl/internal/recursivefilteriterator.inc b/ext/spl/internal/recursivefilteriterator.inc index b1271aef87..472af21edf 100755 --- a/ext/spl/internal/recursivefilteriterator.inc +++ b/ext/spl/internal/recursivefilteriterator.inc @@ -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()); } |