*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0
- * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright(c) 2007 - 2009 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
*
* This program is free software: you can redistribute it and/or modify
* @return void
*/
public final function entryPoint () {
- trigger_error(__METHOD__.": Cleared!");
+ // --------------------- Init phase ---------------------
+ // The default node-mode is from our configuration
+ $nodeMode = $this->getConfigInstance()->readConfig('node_mode');
+
+ // Prepare a ConsoleRequest class to catch all parameters
+ $requestInstance = ObjectFactory::createObjectByName('ConsoleRequest');
+
+ // Is the node 'mode' parameter set?
+ if ($requestInstance->isRequestElementSet('mode')) {
+ // Then use this which overrides the config entry temporarily
+ $nodeMode = $requestInstance->getRequestElement('mode');
+ } // END - if
+
+ // Now convert the node-mode in a class name
+ $className = 'Hub' . $this->convertToClassName($nodeMode) . 'Node';
+
+ // And try to instance it
+ $nodeInstance = ObjectFactory::createObjectByName($className);
+
+ // --------------------- Bootstrapping phase ---------------------
+ // Try to bootstrap the node and pass the request instance to it
+ $nodeInstance->doBootstrapping($requestInstance);
}
/**
* @return $masterTemplateName Name of the master template
*/
public function buildMasterTemplateName () {
- return "hub_main";
+ return "node_main";
}
}