Added simple loop for checking entries. This will change in the future which is
authorRoland Haeder <roland@mxchange.org>
Thu, 22 May 2014 19:58:52 +0000 (21:58 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 May 2014 19:58:52 +0000 (21:58 +0200)
the reason for putting same code in 2 classes.

Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/index/class_BaseIndex.php
inc/classes/main/stacker/file/class_BaseFileStack.php

index 18b2d69ae3544b9e19804b898e3c4f7c78a9e61b..d4a2c6b6023d0a5ce4532e573750eb53486f1e26 100644 (file)
@@ -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__));
 
                // 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__));
        }
 
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
index 53afecbd50b5aede20952acbc1327a242ad3f141..01193aab761de4e2eadbda4216d3100bafcbeede 100644 (file)
@@ -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__));
 
                // 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__));
        }
 
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }