+ // Set this application in registry
+ Registry::getRegistry()->addInstance('app', $this);
+
+ // Is no external address set?
+ if ($this->getConfigInstance()->getConfigEntry('external_address') == '') {
+ // Determine external address
+ $this->getConfigInstance()->setConfigEntry('external_address', HubTools::determineOwnExternalAddress());
+ } // END - if
+
+ // Default response is console
+ $response = self::getResponseTypeFromSystem();
+ $responseType = self::getResponseTypeFromSystem();
+
+ // Create a new request object
+ $requestInstance = ObjectFactory::createObjectByName(self::convertToClassName($response) . 'Request');
+
+ // Remember request instance here
+ $this->setRequestInstance($requestInstance);
+
+ // Do we have another response?
+ if ($requestInstance->isRequestElementSet('request')) {
+ // Then use it
+ $response = strtolower($requestInstance->getRequestElement('request'));
+ $responseType = $response;
+ } // END - if
+
+ // ... and a new response object
+ $responseClass = sprintf('%sResponse', self::convertToClassName($response));
+ $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this));
+
+ // Remember response instance here
+ $this->setResponseInstance($responseInstance);
+
+ // Get the parameter from the request
+ $commandName = $requestInstance->getRequestElement('command');
+
+ // If it is null then get default command
+ if (is_null($commandName)) {
+ // Get default command
+ $commandName = $responseInstance->determineDefaultCommand();
+
+ // Set it in request
+ $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');