$requestInstance->setRequestElement('command', $commandName);
} // END - if
+ // Is the responseType 'html' ?
+ if ($responseType == 'html') {
+ // The language system is needed for this
+ $languageInstance = ObjectFactory::createObjectByConfiguredName('language_system_class');
+
+ // And set it here
+ $this->setLanguageInstance($languageInstance);
+ } // END - if
+
// Get a controller resolver
$resolverClass = self::convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver');
$resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this));
// Launch the hub main routine here
$this->getControllerInstance()->handleRequest($requestInstance, $responseInstance);
- // -------------------------- Shutdown phase --------------------------
- // Shutting down the hub by saying "good bye" to all connected peers
- // and other hubs, flushing all queues and caches.
- self::createDebugInstance(__CLASS__)->debugOutput('MAIN: Shutdown in progress, main loop exited.');
- $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance);
- self::createDebugInstance(__CLASS__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)');
+ // Only for console requests as this is the actual daemon
+ if ($responseType == 'console') {
+ // -------------------------- Shutdown phase --------------------------
+ // Shutting down the hub by saying "good bye" to all connected peers
+ // and other hubs, flushing all queues and caches.
+ self::createDebugInstance(__CLASS__)->debugOutput('MAIN: Shutdown in progress, main loop exited.');
+ $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance);
+ self::createDebugInstance(__CLASS__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)');
+ } // END - if
}
/**