]> git.mxchange.org Git - core.git/blobdiff - application/tests/class_ApplicationHelper.php
Throwable is PHP 7.x and still this framework should support PHP 5 as 7 is
[core.git] / application / tests / class_ApplicationHelper.php
index 3d5e2c9251dfd6a889ef7a61004d228e1782d503..a65e2966681977184bca72762258d7ff6d943f35 100644 (file)
@@ -5,6 +5,7 @@ namespace CoreFramework\Helper\Application;
 // Import framework stuff
 use CoreFramework\Manager\ManageableApplication;
 use CoreFramework\Object\BaseFrameworkSystem;
+use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Registry\Registerable;
 use CoreFramework\Registry\Generic\Registry;
 use CoreFramework\Template\CompileableTemplate;
@@ -167,7 +168,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                $responseType = self::getResponseTypeFromSystem();
 
                // Create a new request object
-               $requestInstance = ObjectFactory::createObjectByName(self::convertToClassName($response) . 'Request');
+               $requestInstance = ObjectFactory::createObjectByName(sprintf('\CoreFramework\Request\%sRequest', self::convertToClassName($response)));
 
                // Remember request instance here
                $this->setRequestInstance($requestInstance);
@@ -180,7 +181,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                } // END - if
 
                // ... and a new response object
-               $responseClass = sprintf('%sResponse', self::convertToClassName($response));
+               $responseClass = sprintf('\CoreFramework\Response\%sResponse', self::convertToClassName($response));
                $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this));
 
                // Remember response instance here
@@ -211,9 +212,9 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                // -------------------------- 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.');
+               self::createDebugInstance(__CLASS__, __LINE__)->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.)');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)');
        }
 
        /**