From: Roland Häder Date: Thu, 18 May 2017 21:27:37 +0000 (+0200) Subject: fixed controller/resolver stuff (old-lost code) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2be21bfd287c6a5cef86478c1f69efda78f97b62;p=hub.git fixed controller/resolver stuff (old-lost code) Signed-off-by: Roland Häder --- diff --git a/application/hub/class_ApplicationHelper.php b/application/hub/class_ApplicationHelper.php index 5b19d0bbd..1ef110253 100644 --- a/application/hub/class_ApplicationHelper.php +++ b/application/hub/class_ApplicationHelper.php @@ -219,8 +219,8 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica $requestInstance->setRequestElement('command', $commandName); } // END - if - // Is the responseType 'html' ? - if ($responseType == 'html') { + // Is the request type 'html' ? + if (FrameworkBootstrap::getRequestTypeFromSystem() == 'html') { // The language system is needed for this $languageInstance = ObjectFactory::createObjectByConfiguredName('language_system_class'); @@ -229,17 +229,24 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica } // END - if // Get a controller resolver - $resolverClass = self::convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver'); + $resolverClass = sprintf( + 'CoreFramework\Tests\Resolver\Controller\%s', + self::convertToClassName(sprintf( + '%s_%s_controller_resolver', + $this->getAppShortName(), + FrameworkBootstrap::getRequestTypeFromSystem() + )) + ); $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this)); // Get a controller instance as well $this->setControllerInstance($resolverInstance->resolveController()); - // Launch the hub main routine here + // Launch the test suite here $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance); // Only for console requests as this is the actual daemon - if ($responseType == 'console') { + if ($requestType == 'console') { // -------------------------- Shutdown phase -------------------------- // Shutting down the hub by saying "good bye" to all connected peers // and other hubs, flushing all queues and caches.