X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fselector%2Fclass_ApplicationHelper.php;fp=application%2Fselector%2Fclass_ApplicationHelper.php;h=c94407f83d46375bd67957062f8d0a523e5bcd62;hp=4f455f340f2795fa268535f6a42b6f7da533cc01;hb=f7fd66d99fcae95e27dbce35b593269b198acf85;hpb=8781e18695edf8ff64edd48433611276f6663c29 diff --git a/application/selector/class_ApplicationHelper.php b/application/selector/class_ApplicationHelper.php index 4f455f3..c94407f 100644 --- a/application/selector/class_ApplicationHelper.php +++ b/application/selector/class_ApplicationHelper.php @@ -170,14 +170,14 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica } // END - if // ... and a new response object - $responseClass = sprintf("%sResponse", $this->convertToClassName($response)); + $responseClass = sprintf('%sResponse', $this->convertToClassName($response)); $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this)); // Remember response instance here $this->setResponseInstance($responseInstance); // Get the parameter from the request - $commandName = $requestInstance->getRequestElement('command'); + $commandName = $requestInstance->getRequestElement('page'); // If it is null then get default command if (is_null($commandName)) { @@ -185,7 +185,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica $commandName = $responseInstance->getDefaultCommand(); // Set it in request - $requestInstance->setRequestElement('command', $commandName); + $requestInstance->setRequestElement('page', $commandName); } // END - if // Get a controller resolver @@ -195,10 +195,26 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica // Get a controller instance as well $this->setControllerInstance($resolverInstance->resolveController()); + // Initialize language system + $languageInstance = ObjectFactory::createObjectByConfiguredName('language_system_class'); + + // And set it here + $this->setLanguageInstance($languageInstance); + // Launch the main routine here $this->getControllerInstance()->handleRequest($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) { + } + /** * Handle the indexed array of fatal messages and puts them out in an * acceptable fasion