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());
// 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.)');
+ }
}
/**