]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/lists/class_BaseList.php
Tasks extended, iterator added:
[hub.git] / application / hub / main / lists / class_BaseList.php
index 99306aca654d5252e7019735de4a79a59ce426c9..5f14f47be4b36c62168d0abea27212ef32b44c56 100644 (file)
@@ -60,7 +60,7 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
         */
        public function getIterator () {
                // Prepare a default iterator
-               $iteratorInstance = ObjectFactory::createObjectByConfiguredName('default_iterator_class');
+               $iteratorInstance = ObjectFactory::createObjectByConfiguredName('default_iterator_class', array($this));
 
                // And return it
                return $iteratorInstance;
@@ -226,6 +226,9 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
                } elseif (is_string($entry)) {
                        // String found
                        $entry2 = crc32($entry) . ':' . strlen($entry);
+               } elseif ((is_array($entry)) && (isset($entry['id']))) {
+                       // Supported array found
+                       $entry2 = crc32($entry['id']) . ':' . count($entry);
                } else {
                        // Unsupported type detected
                        $this->debugOutut(__METHOD__ . ': entry type ' . gettype($entry) . ' is unsupported.');