]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php
Two methods in CruncherTestUnitProducer are now throwing UnsupportedOperationExceptio...
[hub.git] / application / hub / main / producer / cruncher / work_units / class_CruncherTestUnitProducer.php
index deb010694e62f45c931e8b66377cc9373cd22386..172083521054447c8401ec9d63bbaa831718a536 100644 (file)
@@ -111,14 +111,27 @@ class CruncherTestUnitProducer extends BaseUnitProducer implements UnitProducer,
                         * Now we need to create an iterator, just as for the work units,
                         * to create new keys from the encrypted message. The iterator will
                         * not iterate over an object nor a collection. It will instead
-                        * encapsulate "key production" into a class and not in a simple
+                        * encapsulate the "key production" into a class and not in a simple
                         * for() loop. These keys then needs to be bundled into test units
                         * and stored to database for later re-usage.
                         */
 
                        // First get an iterator, again the helper will do that for us
                        $iteratorInstance = $this->getHelperInstance()->getKeyIterator();
-                       die(__METHOD__."\n");
+
+                       // Begin the "key production"
+                       while ($iteratorInstance->valid()) {
+                               // Get current key (which is not the key of the iterator)
+                               $currentKey = $iteratorInstance->current();
+
+                               // @TODO Do something with it
+                               $this->debugOutput('currentKey=' . $currentKey . ' needs to be processed.');
+
+                               // Continue with next one
+                               $iteratorInstance->next();
+                       } // END - while
+
+                       die(__METHOD__.": Ended the key production.\n");
                }
        }
 }