From 2be21bfd287c6a5cef86478c1f69efda78f97b62 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 18 May 2017 23:27:37 +0200 Subject: [PATCH] fixed controller/resolver stuff (old-lost code) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- application/hub/class_ApplicationHelper.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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. -- 2.39.5