X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=application%2Ftests%2Fclass_ApplicationHelper.php;h=670cf90154f3b7d5a6cff606dca63036ae6dc016;hb=4d0ccf3c0e7162cbe32df98a6d127c86525c1b8a;hp=f05d1d9f6336ea38fbf21647b9ef67b382f14583;hpb=75d22b262f62dd88e577ade6da3d6be9d34b9930;p=core.git diff --git a/application/tests/class_ApplicationHelper.php b/application/tests/class_ApplicationHelper.php index f05d1d9f..670cf901 100644 --- a/application/tests/class_ApplicationHelper.php +++ b/application/tests/class_ApplicationHelper.php @@ -1,4 +1,15 @@ * @version 0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -153,11 +164,11 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica Registry::getRegistry()->addInstance('app', $this); // Default response is console - $response = $this->getResponseTypeFromSystem(); - $responseType = $this->getResponseTypeFromSystem(); + $response = self::getResponseTypeFromSystem(); + $responseType = self::getResponseTypeFromSystem(); // Create a new request object - $requestInstance = ObjectFactory::createObjectByName($this->convertToClassName($response) . 'Request'); + $requestInstance = ObjectFactory::createObjectByName(sprintf('\CoreFramework\Request\%sRequest', self::convertToClassName($response))); // Remember request instance here $this->setRequestInstance($requestInstance); @@ -170,7 +181,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica } // END - if // ... and a new response object - $responseClass = sprintf('%sResponse', $this->convertToClassName($response)); + $responseClass = sprintf('\CoreFramework\Response\%sResponse', self::convertToClassName($response)); $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this)); // Remember response instance here @@ -182,14 +193,14 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica // If it is null then get default command if (is_null($commandName)) { // Get default command - $commandName = $responseInstance->getDefaultCommand(); + $commandName = $responseInstance->determineDefaultCommand(); // Set it in request $requestInstance->setRequestElement('command', $commandName); } // END - if // Get a controller resolver - $resolverClass = $this->convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver'); + $resolverClass = self::convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver'); $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this)); // Get a controller instance as well @@ -228,7 +239,16 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica public function buildMasterTemplateName () { return 'node_main'; } -} -// [EOF] -?> + /** + * Assigns extra application-depending data + * + * @param $templateInstance An instance of a CompileableTemplate + * @return void + * @todo Nothing to add? + */ + public function assignExtraTemplateData (CompileableTemplate $templateInstance) { + $this->partialStub('Unfinished method. templateInstance=' . $templateInstance->__toString()); + } + +}