]> git.mxchange.org Git - city.git/blobdiff - application/city/class_ApplicationHelper.php
Continued:
[city.git] / application / city / class_ApplicationHelper.php
index 5aa8b14a4a821214a5761c26979a6afd27f82868..17bf18b79def945d127a7ccfdb9b44f445254ea0 100644 (file)
@@ -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.)');
+               }
        }
 
        /**