X-Git-Url: https://git.mxchange.org/?p=city.git;a=blobdiff_plain;f=application%2Fcity%2Fclass_ApplicationHelper.php;h=17bf18b79def945d127a7ccfdb9b44f445254ea0;hp=5aa8b14a4a821214a5761c26979a6afd27f82868;hb=d100f068798a47a699aa723c0b4bd62b3025c1b6;hpb=083892d43cd5e566fba63c0ef6d1c75dde5944f2 diff --git a/application/city/class_ApplicationHelper.php b/application/city/class_ApplicationHelper.php index 5aa8b14..17bf18b 100644 --- a/application/city/class_ApplicationHelper.php +++ b/application/city/class_ApplicationHelper.php @@ -214,7 +214,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication FrameworkBootstrap::getRequestTypeFromSystem() )) ); - $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this)); + $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName)); // Get a controller instance as well $this->setControllerInstance($resolverInstance->resolveController()); @@ -225,13 +225,22 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication // And set it here $this->setLanguageInstance($languageInstance); - // Launch the test suite here + // Is html request? + if (FrameworkBootstrap::getRequestTypeFromSystem() == 'html') { + // Init web output instance + $this->initWebOutputInstance(); + } + + // Launch the application here $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance); - // -------------------------- Shutdown phase -------------------------- - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown in progress ...'); - $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance); - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)'); + // Is console request? + if (FrameworkBootstrap::getRequestTypeFromSystem() == 'console') { + // -------------------------- Shutdown phase -------------------------- + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown in progress ...'); + $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance); + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)'); + } } /**