cvs: pecl /spl/examples cachingrecursiveiterator.inc directorygraphiterator.inc directorytreeiterator.inc

From: Date: Sun, 07 Dec 2003 13:21:47 +0000
Subject: cvs: pecl /spl/examples cachingrecursiveiterator.inc directorygraphiterator.inc directorytreeiterator.inc
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-560@lists.php.net to get a copy of this message
helly Sun Dec 7 08:21:47 2003 EDT Modified files: /pecl/spl/examples cachingrecursiveiterator.inc directorygraphiterator.inc directorytreeiterator.inc Log: Update examples Index: pecl/spl/examples/cachingrecursiveiterator.inc diff -u pecl/spl/examples/cachingrecursiveiterator.inc:1.3 pecl/spl/examples/cachingrecursiveiterator.inc:1.4 --- pecl/spl/examples/cachingrecursiveiterator.inc:1.3 Sat Nov 22 15:51:15 2003 +++ pecl/spl/examples/cachingrecursiveiterator.inc Sun Dec 7 08:21:47 2003 @@ -6,20 +6,20 @@ 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) { Index: pecl/spl/examples/directorygraphiterator.inc diff -u pecl/spl/examples/directorygraphiterator.inc:1.1 pecl/spl/examples/directorygraphiterator.inc:1.2 --- pecl/spl/examples/directorygraphiterator.inc:1.1 Sat Nov 22 15:52:06 2003 +++ pecl/spl/examples/directorygraphiterator.inc Sun Dec 7 08:21:47 2003 @@ -4,7 +4,7 @@ { 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); } } Index: pecl/spl/examples/directorytreeiterator.inc diff -u pecl/spl/examples/directorytreeiterator.inc:1.5 pecl/spl/examples/directorytreeiterator.inc:1.6 --- pecl/spl/examples/directorytreeiterator.inc:1.5 Thu Dec 4 15:24:06 2003 +++ pecl/spl/examples/directorytreeiterator.inc Sun Dec 7 08:21:47 2003 @@ -4,7 +4,7 @@ { function __construct($path) { - parent::__construct(new CachingRecursiveIterator(new RecursiveDirectoryIterator($path), true), 1); + parent::__construct(new CachingRecursiveIterator(new RecursiveDirectoryIterator($path), true, true), 1); } function current()

« previous php.pecl.cvs (#560) next »