summaryrefslogtreecommitdiff
path: root/ext/spl/examples
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-12-07 13:21:47 +0000
committerMarcus Boerger <helly@php.net>2003-12-07 13:21:47 +0000
commitcca2a74462cc36c9af1ac058ecc5e94bc3d0b8f8 (patch)
treeba765588d28d82b1a318d3090d1ce54c5cae4581 /ext/spl/examples
parentfacea7fb70457b42e515a5b19e44889e16923ebd (diff)
downloadphp-git-cca2a74462cc36c9af1ac058ecc5e94bc3d0b8f8.tar.gz
Update examples
Diffstat (limited to 'ext/spl/examples')
-rw-r--r--ext/spl/examples/cachingrecursiveiterator.inc8
-rw-r--r--ext/spl/examples/directorygraphiterator.inc2
-rw-r--r--ext/spl/examples/directorytreeiterator.inc2
3 files changed, 6 insertions, 6 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) {
diff --git a/ext/spl/examples/directorygraphiterator.inc b/ext/spl/examples/directorygraphiterator.inc
index 190aba92ee..b1b8743b4c 100644
--- a/ext/spl/examples/directorygraphiterator.inc
+++ b/ext/spl/examples/directorygraphiterator.inc
@@ -4,7 +4,7 @@ class DirectoryGraphIterator extends DirectoryTreeIterator
{
function __construct($path)
{
- RecursiveIteratorIterator::__construct(new CachingRecursiveIterator(new ParentIterator(new RecursiveDirectoryIterator($path)), true), 1);
+ RecursiveIteratorIterator::__construct(new CachingRecursiveIterator(new ParentIterator(new RecursiveDirectoryIterator($path)), true, true), 1);
}
}
diff --git a/ext/spl/examples/directorytreeiterator.inc b/ext/spl/examples/directorytreeiterator.inc
index 6465f51253..3accacae43 100644
--- a/ext/spl/examples/directorytreeiterator.inc
+++ b/ext/spl/examples/directorytreeiterator.inc
@@ -4,7 +4,7 @@ class DirectoryTreeIterator extends RecursiveIteratorIterator
{
function __construct($path)
{
- parent::__construct(new CachingRecursiveIterator(new RecursiveDirectoryIterator($path), true), 1);
+ parent::__construct(new CachingRecursiveIterator(new RecursiveDirectoryIterator($path), true, true), 1);
}
function current()