From 6d54ef031eb27d1b9a46ce92f39a3c9b19633eb3 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 22 May 2014 21:58:52 +0200 Subject: [PATCH] Added simple loop for checking entries. This will change in the future which is the reason for putting same code in 2 classes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/classes/main/index/class_BaseIndex.php | 12 ++++++++++++ .../main/stacker/file/class_BaseFileStack.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/inc/classes/main/index/class_BaseIndex.php b/inc/classes/main/index/class_BaseIndex.php index 18b2d69a..d4a2c6b6 100644 --- a/inc/classes/main/index/class_BaseIndex.php +++ b/inc/classes/main/index/class_BaseIndex.php @@ -167,6 +167,18 @@ class BaseIndex extends BaseFrameworkSystem { // Output message (as this may take some time) self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Analyzing file structure ... (this may take some time)', __METHOD__, __LINE__)); + // First rewind to the begining + $this->getIteratorInstance()->rewind(); + + // Then try to load all entries + while ($this->getIteratorInstance()->next()) { + // Get current entry + $current = $this->getIteratorInstance()->current(); + + // Simply output it + self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] current=%s', __METHOD__, __LINE__, print_r($current, TRUE))); + } // END - while + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__)); } diff --git a/inc/classes/main/stacker/file/class_BaseFileStack.php b/inc/classes/main/stacker/file/class_BaseFileStack.php index 53afecbd..01193aab 100644 --- a/inc/classes/main/stacker/file/class_BaseFileStack.php +++ b/inc/classes/main/stacker/file/class_BaseFileStack.php @@ -189,6 +189,18 @@ class BaseFileStack extends BaseStacker { // Output message (as this may take some time) self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Analyzing file structure ... (this may take some time)', __METHOD__, __LINE__)); + // First rewind to the begining + $this->getIteratorInstance()->rewind(); + + // Then try to load all entries + while ($this->getIteratorInstance()->next()) { + // Get current entry + $current = $this->getIteratorInstance()->current(); + + // Simply output it + self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] current=%s', __METHOD__, __LINE__, print_r($current, TRUE))); + } // END - while + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__)); } -- 2.39.5