application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php -text svneol=unset#text/plain
application/hub/main/iterator/pool/tasks/.htaccess -text svneol=unset#text/plain
application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php -text svneol=unset#text/plain
+application/hub/main/iterator/producer/.htaccess svneol=native#text/plain
+application/hub/main/iterator/producer/class_TestUnitKeyProducerIterator.php svneol=native#text/plain
application/hub/main/listener/.htaccess -text svneol=unset#text/plain
application/hub/main/listener/class_ -text svneol=unset#text/plain
application/hub/main/listener/class_BaseListener.php -text svneol=unset#text/plain
application/hub/templates/xml/self_connect/self_connect.xml -text svneol=unset#text/plain
/clear-cache.sh -text
db/.htaccess -text svneol=unset#text/plain
+db/cruncher_projects/.htaccess svneol=native#text/plain
db/cruncher_units/.htaccess svneol=native#text/plain
db/news/.htaccess -text svneol=unset#text/plain
db/node_data/.htaccess -text svneol=unset#text/plain
// CFG: HUB-PING-ITERATOR-CLASS
$cfg->setConfigEntry('hub_ping_iterator_class', 'HubPingIterator');
+// CFG: TEST-UNIT-PRODUCER-KEY-ITERATOR-CLASS
+$cfg->setConfigEntry('test_unit_producer_key_iterator_class', 'TestUnitKeyProducerIterator');
+
+// CFG: WORK-UNIT-PRODUCER-KEY-ITERATOR-CLASS
+$cfg->setConfigEntry('work_unit_producer_key_iterator_class', 'WorkUnitKeyProducerIterator');
+
// CFG: LOCAL-QUERY-LIST-CLASS
$cfg->setConfigEntry('local_query_list_class', 'LocalQueryList');
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
interface MessageHelper extends Helper {
+ /**
+ * Generates an encrypted random message
+ *
+ * @return $encryptedMessage The encrypted random message
+ */
+ function generateRandomMessage ();
+
+ /**
+ * "Getter" for an iterator for keys
+ *
+ * @param $encryptedMessage The encrypted message
+ * @return $iteratorInstance An instance of a Iterator class
+ */
+ function getKeyIterator ();
}
// [EOF]
/**
* Generates a work/test/foo unit instance
*
- * @return $unitInstance A work unit instance
+ * @return $unitInstance A work/test/foo unit instance
*/
- function generateUnit ();
+ function generateNextUnitInstance ();
}
// [EOF]
// We don't need an iterator here because we just need to generate some test units
for ($idx = 0; $idx < $this->getConfigInstance()->getConfigEntry('cruncher_max_text_unit_amount'); $idx++) {
// Get a test unit from it
- $unitInstance = $generatorInstance->generateUnit();
+ $unitInstance = $generatorInstance->generateNextUnitInstance();
// ... and finally queue it to the in-buffer queue
$this->queueUnitInstanceToInBuffer($unitInstance);
// Return it
return $encryptedMessage;
}
+
+ /**
+ * "Getter" for an iterator for keys
+ *
+ * @return $iteratorInstance An instance of a Iterator class
+ */
+ public function getKeyIterator () {
+ // Create the iterator instance
+ $iteratorInstance = ObjectFactory::createObjectByConfiguredName('test_unit_producer_key_iterator_class');
+
+ // And return it
+ return $iteratorInstance;
+ }
}
// [EOF]
* @return $unitInstance A work unit instance
* @todo 0% done
*/
- public function generateUnit () {
+ public function generateNextUnitInstance () {
$this->partialStub('Please implement this method.');
}
}
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A TestUnitKeyProducer iterator
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class TestUnitKeyProducerIterator extends BaseIterator implements Iterator {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $iteratorInstance An instance of a Iterator class
+ */
+ public final static function createTestUnitKeyProducerIterator () {
+ // Get new instance
+ $iteratorInstance = new TestUnitKeyProducerIterator();
+
+ // Return the prepared instance
+ return $iteratorInstance;
+ }
+
+ /**
+ * Getter for current value from group or generic
+ *
+ * @return $current Current value in iteration
+ */
+ public function current () {
+ // Default is null
+ $current = null;
+
+ $this->partialStub('Please implement this method.');
+
+ // Return it
+ return $current;
+ }
+
+ /**
+ * Getter for key from group or generic
+ *
+ * @return $key Current key in iteration
+ */
+ public function key () {
+ // Default is null
+ $key = null;
+
+ $this->partialStub('Please implement this method.');
+
+ // Return it
+ return $key;
+ }
+
+ /**
+ * Advances to the next entry
+ *
+ * @return void
+ */
+ public function next () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Rewinds to the beginning of the iteration
+ *
+ * @return void
+ */
+ public function rewind () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Checks wether the current entry is valid (not at the end of the list)
+ *
+ * @return void
+ */
+ public function valid () {
+ $this->partialStub('Please implement this method.');
+ }
+}
+
+// [EOF]
+?>
/*
* 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 or collection. It will instead
+ * not iterate over an object nor a collection. It will instead
* encapsulate "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");
}
}
}
--- /dev/null
+Deny from all
./inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo Try to rewrite user/guest login classes and mark this exception as deprecated
./inc/classes/exceptions/main/class_NoConfigEntryException.php:10: * @todo Rename this class to NoFoundEntryException
./inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo Find a better name for this interface
-./inc/classes/main/class_BaseFrameworkSystem.php:1178: * @todo Write a logging mechanism for productive mode
-./inc/classes/main/class_BaseFrameworkSystem.php:1192: // @TODO Finish this part!
+./inc/classes/main/class_BaseFrameworkSystem.php:1196: * @todo Write a logging mechanism for productive mode
+./inc/classes/main/class_BaseFrameworkSystem.php:1210: // @TODO Finish this part!
./inc/classes/main/class_BaseFrameworkSystem.php:169: // @todo Try to clean these constants up
-./inc/classes/main/class_BaseFrameworkSystem.php:355: * @todo SearchableResult and UpdateableResult shall have a super interface to use here
+./inc/classes/main/class_BaseFrameworkSystem.php:367: * @todo SearchableResult and UpdateableResult shall have a super interface to use here
./inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64: * @todo Add some stuff here: Some personal data, app/game related data
./inc/classes/main/commands/web/class_WebProblemCommand.php:58: * @todo 0% done
./inc/classes/main/commands/web/class_WebStatusCommand.php:58: * @todo 0% done
./inc/classes/main/controller/web/class_WebProblemController.php:40: * @todo Add some filters to this controller
./inc/classes/main/controller/web/class_WebRegisterController.php:40: * @todo Add some filters to this controller
./inc/classes/main/controller/web/class_WebStatusController.php:10: * @todo This controller shall still provide some headlines for sidebars
-./inc/classes/main/criteria/search/class_SearchCriteria.php:114: * @todo Find a nice casting here. (int) allows until and including 32766.
+./inc/classes/main/criteria/search/class_SearchCriteria.php:126: * @todo Find a nice casting here. (int) allows until and including 32766.
./inc/classes/main/criteria/search/class_SearchCriteria.php:94: * @todo Find a nice casting here. (int) allows until and including 32766.
./inc/classes/main/database/databases/class_LocalFileDatabase.php:360: * @todo Do some checks on the database directory and files here
./inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php:426: * @todo Find something useful with this!