diff options
| author | Marcus Boerger <helly@php.net> | 2003-12-07 13:21:47 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2003-12-07 13:21:47 +0000 |
| commit | cca2a74462cc36c9af1ac058ecc5e94bc3d0b8f8 (patch) | |
| tree | ba765588d28d82b1a318d3090d1ce54c5cae4581 /ext/spl/examples/cachingrecursiveiterator.inc | |
| parent | facea7fb70457b42e515a5b19e44889e16923ebd (diff) | |
| download | php-git-cca2a74462cc36c9af1ac058ecc5e94bc3d0b8f8.tar.gz | |
Update examples
Diffstat (limited to 'ext/spl/examples/cachingrecursiveiterator.inc')
| -rw-r--r-- | ext/spl/examples/cachingrecursiveiterator.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/spl/examples/cachingrecursiveiterator.inc b/ext/spl/examples/cachingrecursiveiterator.inc index 59709a7522..898d40b0bc 100644 --- a/ext/spl/examples/cachingrecursiveiterator.inc +++ b/ext/spl/examples/cachingrecursiveiterator.inc @@ -6,20 +6,20 @@ class CachingRecursiveIterator extends CachingIterator implements RecursiveItera protected $getChildren; protected $catch_get_child; - function __construct(RecursiveIterator $it, $catch_get_child = false) + function __construct(RecursiveIterator $it, $getStrVal = true, $catch_get_child = false) { $this->catch_get_child = $catch_get_child; - parent::__construct($it); + parent::__construct($it, $getStrVal); } function next() { if ($this->hasChildren = $this->it->hasChildren()) { try { - //$this->getChildren = new CachingRecursiveIterator($this->it->getChildren(), $this->catch_get_child); + //$this->getChildren = new CachingRecursiveIterator($this->it->getChildren(), $this->getStrVal, $this->catch_get_child); // workaround memleaks... $child = $this->it->getChildren(); - $this->getChildren = new CachingRecursiveIterator($child, $this->catch_get_child); + $this->getChildren = new CachingRecursiveIterator($child, $this->getStrVal, $this->catch_get_child); } catch(Exception $e) { if (!$this->catch_get_child) { |
