X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Ftests%2Fclass_ApplicationHelper.php;h=5d3c60dc181e9128c43d84e74161d168eb441f7e;hb=da5291226d3b33102754943711ba4d6e29376ebe;hp=f210bbf43c8a3d61c794554b3cbfca39867625a9;hpb=65f6c4366c9709c9c7c9070d903f1d948be0d5b0;p=core.git diff --git a/application/tests/class_ApplicationHelper.php b/application/tests/class_ApplicationHelper.php index f210bbf4..5d3c60dc 100644 --- a/application/tests/class_ApplicationHelper.php +++ b/application/tests/class_ApplicationHelper.php @@ -3,8 +3,12 @@ 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\Registry; +use CoreFramework\Template\CompileableTemplate; /** * A class holding general data about the application and some methods for @@ -164,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); @@ -177,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 @@ -196,7 +200,14 @@ 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(), + $responseType + )) + ); $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this)); // Get a controller instance as well @@ -206,11 +217,9 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance); // -------------------------- 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 ...'); $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.)'); } /**