X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fmxchange%2Fclass_ApplicationHelper.php;h=538829ba5d27b5d9f6ac6575938ab0cfffbd0179;hb=97cf8ba03ad3f107f9d0a296fa715c83ee784955;hp=edea93394375789577b554daae56f6a6b9c1e4d6;hpb=dcdc9e7628be1422435821fc4ca9d7f82bb3ec6e;p=mailer.git diff --git a/application/mxchange/class_ApplicationHelper.php b/application/mxchange/class_ApplicationHelper.php index edea933943..538829ba5d 100644 --- a/application/mxchange/class_ApplicationHelper.php +++ b/application/mxchange/class_ApplicationHelper.php @@ -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')) { @@ -201,7 +201,11 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication // If it is null then get default command if (is_null($commandName)) { + // Get default command $commandName = $responseInstance->getDefaultCommand(); + + // Set it in request + $requestInstance->setRequestElement('page', $commandName); } // END - if // Get a resolver @@ -211,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); }