X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fship-simu%2Fclass_ApplicationHelper.php;h=d85438a054db7e6a7781398cdefee154cfa0254b;hb=4ec5b5653a30ec86e0647bfc79d8bd2e192f453c;hp=f459a64580f07b87f0511978696bd9f57a99856e;hpb=0f10df895de1dd67a2bbec5264f01c5e146de952;p=shipsimu.git diff --git a/application/ship-simu/class_ApplicationHelper.php b/application/ship-simu/class_ApplicationHelper.php index f459a64..d85438a 100644 --- a/application/ship-simu/class_ApplicationHelper.php +++ b/application/ship-simu/class_ApplicationHelper.php @@ -160,7 +160,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication */ public function buildMasterTemplateName () { // Get short name and add suffix - $masterTemplateName = str_replace("-", "", $this->getAppShortName()) . "_main"; + $masterTemplateName = str_replace('-', '', $this->getAppShortName()) . '_main'; // Return it return $masterTemplateName; @@ -178,9 +178,9 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication // Remember request instance here $this->setRequestInstance($requestInstance); - // Default response is HTTP (HTML page) and type is "Web" - $response = "http"; - $responseType = "web"; + // Default response is HTTP (HTML page) and type is 'Web' + $response = 'http'; + $responseType = 'web'; // Do we have another response? if ($requestInstance->isRequestElementSet('request')) { @@ -205,7 +205,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication $commandName = $responseInstance->getDefaultCommand(); // Set it in request - $requestInstance->setRequestElement('page'); + $requestInstance->setRequestElement('page', $commandName); } // END - if // Get a resolver @@ -215,6 +215,12 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication // Get a controller instance as well $this->controllerInstance = $resolverInstance->resolveController(); + // Get a web output class + $outputInstance = ObjectFactory::createObjectByConfiguredName('output_class', array($this)); + + // Set it in this application + $this->setWebOutputInstance($outputInstance); + // Handle the request $this->controllerInstance->handleRequest($requestInstance, $responseInstance); }