]> git.mxchange.org Git - city.git/blobdiff - application/city/class_ApplicationHelper.php
'page' and 'command' were both the same (command), so better name it same way.
[city.git] / application / city / class_ApplicationHelper.php
index c00184f1b623c0e23df8f44809b7bc4a5f9cdfd1..f713acb0a17376e0d35add3e5425406740e146f9 100644 (file)
@@ -153,8 +153,8 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                Registry::getRegistry()->addInstance('app', $this);
 
                // Default response is console
-               $response = $this->getResponseTypeFromSystem();
-               $responseType = $this->getResponseTypeFromSystem();
+               $response = self::getResponseTypeFromSystem();
+               $responseType = self::getResponseTypeFromSystem();
 
                // Create a new request object
                $requestInstance = ObjectFactory::createObjectByName($this->convertToClassName($response) . 'Request');
@@ -182,7 +182,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                // If it is null then get default command
                if (is_null($commandName)) {
                        // Get default command
-                       $commandName = $responseInstance->getDefaultCommand();
+                       $commandName = $responseInstance->determineDefaultCommand();
 
                        // Set it in request
                        $requestInstance->setRequestElement('command', $commandName);
@@ -195,11 +195,27 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                // Get a controller instance as well
                $this->setControllerInstance($resolverInstance->resolveController());
 
-               // Launch the test suite here
+               // Initialize language system
+               $languageInstance = ObjectFactory::createObjectByConfiguredName('language_system_class');
+
+               // And set it here
+               $this->setLanguageInstance($languageInstance);
+
+               // Launch the game here
                $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance);
 
                // -------------------------- Shutdown phase --------------------------
-               // @TODO $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance);
+               $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance);
+       }
+
+       /**
+        * Assigns extra application-depending data
+        *
+        * @param       $templateInstance       An instance of a CompileableTemplate
+        * @return      void
+        * @todo        Nothing to add?
+        */
+       public function assignExtraTemplateData (CompileableTemplate $templateInstance) {
        }
 
        /**
@@ -222,7 +238,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
         * @return      $masterTemplateName             Name of the master template
         */
        public function buildMasterTemplateName () {
-               return 'node_main';
+               return 'city_main';
        }
 }