]> git.mxchange.org Git - hub.git/blobdiff - application/hub/class_ApplicationHelper.php
Initial coding of hub node-mode.
[hub.git] / application / hub / class_ApplicationHelper.php
index 85c51d124c9b0ac0be7f1fd10bb59bd2e321beb8..eb29ff7b16e6758c7e8f7312f0304c5ec6f11c2c 100644 (file)
@@ -153,7 +153,23 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
         * @return      void
         */
        public final function entryPoint () {
-               trigger_error(__METHOD__.": Cleared!");
+               // The default node mode is from config. This mode is being "transfered" into a class name
+               $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);
        }
 
        /**
@@ -176,7 +192,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
         * @return      $masterTemplateName             Name of the master template
         */
        public function buildMasterTemplateName () {
-               return "hub_main";
+               return "node_main";
        }
 }