]> git.mxchange.org Git - hub.git/commitdiff
fixed controller/resolver stuff (old-lost code)
authorRoland Häder <roland@mxchange.org>
Thu, 18 May 2017 21:27:37 +0000 (23:27 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:49:57 +0000 (18:49 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/class_ApplicationHelper.php

index 5b19d0bbd89e8ca16e2abcaf65a8c4d0223e77be..1ef110253da8cab1b6e739d7bbc97174a1e48b24 100644 (file)
@@ -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.