From 2b4f4b88ec5f9d385110e800494c680e164b5a36 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 11 Apr 2018 22:46:10 +0200 Subject: [PATCH] Continued: - no need to handle $applicationInstance around as it exists in GenericRegister already - please update your index.php to this MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- application/tests/class_ApplicationHelper.php | 2 +- framework/main/classes/commands/class_BaseCommand.php | 2 +- .../classes/commands/html/class_HtmlConfirmCommand.php | 2 +- .../main/classes/commands/html/class_HtmlHomeCommand.php | 2 +- .../classes/commands/html/class_HtmlLoginAreaCommand.php | 7 ++----- .../main/classes/commands/html/class_HtmlLoginCommand.php | 2 +- .../classes/commands/html/class_HtmlLoginFailedCommand.php | 2 +- .../classes/commands/html/class_HtmlLogoutDoneCommand.php | 2 +- .../classes/commands/html/class_HtmlRegisterCommand.php | 2 +- .../classes/commands/html/class_HtmlResendLinkCommand.php | 4 ++-- .../main/classes/commands/html/class_HtmlStatusCommand.php | 2 +- .../template/class_XmlRewriterTemplateDecorator.php | 6 ++---- framework/main/classes/mailer/debug/class_DebugMailer.php | 3 +-- .../resolver/action/html/class_HtmlActionResolver.php | 4 +--- .../command/console/class_ConsoleCommandResolver.php | 6 ++---- .../resolver/command/html/class_HtmlCommandResolver.php | 4 +--- .../resolver/command/image/class_ImageCommandResolver.php | 3 +-- .../controller/console/class_ConsoleControllerResolver.php | 4 +--- .../controller/html/class_HtmlControllerResolver.php | 4 +--- .../controller/image/class_ImageControllerResolver.php | 4 +--- .../main/classes/template/class_BaseTemplateEngine.php | 7 +++++-- .../main/interfaces/template/class_CompileableTemplate.php | 4 +--- .../command/console/class_TestsConsoleCommandResolver.php | 4 +--- .../controller/class_TestsConsoleControllerResolver.php | 4 +--- index.php | 2 +- 25 files changed, 33 insertions(+), 55 deletions(-) diff --git a/application/tests/class_ApplicationHelper.php b/application/tests/class_ApplicationHelper.php index 007ed669..008bda16 100644 --- a/application/tests/class_ApplicationHelper.php +++ b/application/tests/class_ApplicationHelper.php @@ -226,7 +226,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication FrameworkBootstrap::getRequestTypeFromSystem() )) ); - $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this)); + $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName)); // Get a controller instance as well $this->setControllerInstance($resolverInstance->resolveController()); diff --git a/framework/main/classes/commands/class_BaseCommand.php b/framework/main/classes/commands/class_BaseCommand.php index 12ae3690..d38a1979 100644 --- a/framework/main/classes/commands/class_BaseCommand.php +++ b/framework/main/classes/commands/class_BaseCommand.php @@ -62,7 +62,7 @@ abstract class BaseCommand extends BaseFrameworkSystem { $templateInstance = $this->prepareTemplateInstance($applicationInstance); // Transfer application data - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Assign base URL $templateInstance->assignConfigVariable('base_url'); diff --git a/framework/main/classes/commands/html/class_HtmlConfirmCommand.php b/framework/main/classes/commands/html/class_HtmlConfirmCommand.php index e6b3f813..5be6195f 100644 --- a/framework/main/classes/commands/html/class_HtmlConfirmCommand.php +++ b/framework/main/classes/commands/html/class_HtmlConfirmCommand.php @@ -79,7 +79,7 @@ class HtmlConfirmCommand extends BaseCommand implements Commandable { $templateInstance = $this->prepareTemplateInstance($applicationInstance); // Assign application data with template engine - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Assign base URL $templateInstance->assignConfigVariable('base_url'); diff --git a/framework/main/classes/commands/html/class_HtmlHomeCommand.php b/framework/main/classes/commands/html/class_HtmlHomeCommand.php index ef2de9af..4ff2855b 100644 --- a/framework/main/classes/commands/html/class_HtmlHomeCommand.php +++ b/framework/main/classes/commands/html/class_HtmlHomeCommand.php @@ -77,7 +77,7 @@ class HtmlHomeCommand extends BaseCommand implements Commandable { $templateInstance = $this->prepareTemplateInstance($applicationInstance); // Transfer application data - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Load the master template $masterTemplate = $applicationInstance->buildMasterTemplateName(); diff --git a/framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php b/framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php index 3437798d..a7aad82e 100644 --- a/framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php +++ b/framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php @@ -107,7 +107,7 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable { $templateInstance->assignConfigVariable('base_url'); // Assign all the application's data with template variables - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Load the master template $masterTemplate = $applicationInstance->buildMasterTemplateName(); @@ -196,11 +196,8 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable { $this->actionName = self::convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $actReq; } // END - if - // Get application instance - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); - // Get a resolver - $actionResolver = HtmlActionResolver::createHtmlActionResolver($this->actionName, $applicationInstance); + $actionResolver = HtmlActionResolver::createHtmlActionResolver($this->actionName); // Resolve the action $actionInstance = $actionResolver->resolveAction(); diff --git a/framework/main/classes/commands/html/class_HtmlLoginCommand.php b/framework/main/classes/commands/html/class_HtmlLoginCommand.php index 4b5f017a..aa0d9d82 100644 --- a/framework/main/classes/commands/html/class_HtmlLoginCommand.php +++ b/framework/main/classes/commands/html/class_HtmlLoginCommand.php @@ -80,7 +80,7 @@ class HtmlLoginCommand extends BaseCommand implements Commandable { $templateInstance = $this->prepareTemplateInstance($applicationInstance); // Assign application data with template engine - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Assign base URL $templateInstance->assignConfigVariable('base_url'); diff --git a/framework/main/classes/commands/html/class_HtmlLoginFailedCommand.php b/framework/main/classes/commands/html/class_HtmlLoginFailedCommand.php index 3b19b20e..31f8baba 100644 --- a/framework/main/classes/commands/html/class_HtmlLoginFailedCommand.php +++ b/framework/main/classes/commands/html/class_HtmlLoginFailedCommand.php @@ -77,7 +77,7 @@ class HtmlLoginFailedCommand extends BaseCommand implements Commandable { $templateInstance = $this->prepareTemplateInstance($applicationInstance); // Assign application data with template engine - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Load the master template $masterTemplate = $applicationInstance->buildMasterTemplateName(); diff --git a/framework/main/classes/commands/html/class_HtmlLogoutDoneCommand.php b/framework/main/classes/commands/html/class_HtmlLogoutDoneCommand.php index 0ed61017..603974cc 100644 --- a/framework/main/classes/commands/html/class_HtmlLogoutDoneCommand.php +++ b/framework/main/classes/commands/html/class_HtmlLogoutDoneCommand.php @@ -77,7 +77,7 @@ class HtmlLogoutDoneCommand extends BaseCommand implements Commandable { $templateInstance = $this->prepareTemplateInstance($applicationInstance); // Assign application data - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Load the master template $masterTemplate = $applicationInstance->buildMasterTemplateName(); diff --git a/framework/main/classes/commands/html/class_HtmlRegisterCommand.php b/framework/main/classes/commands/html/class_HtmlRegisterCommand.php index 98bd6edc..18e7155f 100644 --- a/framework/main/classes/commands/html/class_HtmlRegisterCommand.php +++ b/framework/main/classes/commands/html/class_HtmlRegisterCommand.php @@ -80,7 +80,7 @@ class HtmlRegisterCommand extends BaseCommand implements Commandable { $templateInstance = $this->prepareTemplateInstance($applicationInstance); // Assign all the application's data with template variables - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Assign base URL $templateInstance->assignConfigVariable('base_url'); diff --git a/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php b/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php index d0e558e8..91485242 100644 --- a/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php +++ b/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php @@ -99,10 +99,10 @@ class HtmlResendLinkCommand extends BaseCommand implements Commandable { $templateInstance = $this->prepareTemplateInstance($applicationInstance); // Assign the application data with the template engine - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Get a mailer class - $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class', array($templateInstance, $applicationInstance, 'resend_link')); + $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class', array($templateInstance, 'resend_link')); // Set this mailer in our template engine $templateInstance->setMailerInstance($mailerInstance); diff --git a/framework/main/classes/commands/html/class_HtmlStatusCommand.php b/framework/main/classes/commands/html/class_HtmlStatusCommand.php index 3bcadda6..e6d4e39e 100644 --- a/framework/main/classes/commands/html/class_HtmlStatusCommand.php +++ b/framework/main/classes/commands/html/class_HtmlStatusCommand.php @@ -77,7 +77,7 @@ class HtmlStatusCommand extends BaseCommand implements Commandable { $templateInstance = $this->prepareTemplateInstance($applicationInstance); // Transfer application data - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); // Load the master template $masterTemplate = $applicationInstance->buildMasterTemplateName(); diff --git a/framework/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php b/framework/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php index 4325fffc..e1467317 100644 --- a/framework/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php +++ b/framework/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php @@ -4,7 +4,6 @@ namespace Org\Mxchange\CoreFramework\Template\Xml; // Import framework stuff use Org\Mxchange\CoreFramework\Generic\BaseDecorator; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Response\Responseable; use Org\Mxchange\CoreFramework\Template\CompileableTemplate; @@ -274,12 +273,11 @@ class XmlRewriterTemplateDecorator extends BaseDecorator implements CompileableT /** * Assigns all the application data with template variables * - * @param $applicationInstance A manageable application instance * @return void */ - public function assignApplicationData (ManageableApplication $applicationInstance) { + public function assignApplicationData () { // Call the inner class' method - $this->getTemplateInstance()->assignApplicationData($applicationInstance); + $this->getTemplateInstance()->assignApplicationData(); } /** diff --git a/framework/main/classes/mailer/debug/class_DebugMailer.php b/framework/main/classes/mailer/debug/class_DebugMailer.php index 40b67c6c..876f3230 100644 --- a/framework/main/classes/mailer/debug/class_DebugMailer.php +++ b/framework/main/classes/mailer/debug/class_DebugMailer.php @@ -8,7 +8,6 @@ use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Mailer\BaseMailer; use Org\Mxchange\CoreFramework\Mailer\DeliverableMail; use Org\Mxchange\CoreFramework\Manager\Login\ManageableMember; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Template\CompileableTemplate; @@ -54,7 +53,7 @@ class DebugMailer extends BaseMailer implements DeliverableMail { * @param $templateName Name of email template to set * @return $mailerInstance An instance of this mailer class */ - public static final function createDebugMailer (CompileableTemplate $templateInstance, ManageableApplication $applicationInstance, $templateName) { + public static final function createDebugMailer (CompileableTemplate $templateInstance, $templateName) { // Get a new instance $mailerInstance = new DebugMailer(); diff --git a/framework/main/classes/resolver/action/html/class_HtmlActionResolver.php b/framework/main/classes/resolver/action/html/class_HtmlActionResolver.php index ee1d601c..05b498df 100644 --- a/framework/main/classes/resolver/action/html/class_HtmlActionResolver.php +++ b/framework/main/classes/resolver/action/html/class_HtmlActionResolver.php @@ -3,7 +3,6 @@ namespace Org\Mxchange\CoreFramework\Resolver\Action; // Import framework stuff -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Request\Requestable; // Import SPL stuff @@ -54,12 +53,11 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver { * Creates an instance of a Html action resolver with a given default action * * @param $actionName The default action we shall execute - * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared action resolver instance * @throws InvalidArgumentException Thrown if default action is not set * @throws InvalidActionException Thrown if default action is invalid */ - public static final function createHtmlActionResolver ($actionName, ManageableApplication $applicationInstance) { + public static final function createHtmlActionResolver ($actionName) { // Create the new instance $resolverInstance = new HtmlActionResolver(); diff --git a/framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php b/framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php index 191f6d59..2fb6e0fc 100644 --- a/framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php +++ b/framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php @@ -5,7 +5,6 @@ namespace Org\Mxchange\CoreFramework\Resolver\Command; // Import framework stuff use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\InvalidCommandException; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; // Import SPL stuff @@ -51,12 +50,11 @@ class ConsoleCommandResolver extends BaseCommandResolver implements CommandResol * Creates an instance of a Console command resolver with a given default command * * @param $commandName The default command we shall execute - * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared command resolver instance - * @throws InvalidArgumentException Thrown if default command is not set + * @throws InvalidArgumentException Thrown if default command is not set * @throws InvalidCommandException Thrown if default command is invalid */ - public static final function createConsoleCommandResolver ($commandName, ManageableApplication $applicationInstance) { + public static final function createConsoleCommandResolver ($commandName) { // Create the new instance $resolverInstance = new ConsoleCommandResolver(); diff --git a/framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php b/framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php index 93c04fe2..e73ddc0b 100644 --- a/framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php +++ b/framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php @@ -4,7 +4,6 @@ namespace Org\Mxchange\CoreFramework\Resolver\Command; // Import framework stuff use Org\Mxchange\CoreFramework\Command\InvalidCommandException; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; // Import SPL stuff @@ -55,12 +54,11 @@ class HtmlCommandResolver extends BaseCommandResolver implements CommandResolver * Creates an instance of a Html command resolver with a given default command * * @param $commandName The default command we shall execute - * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared command resolver instance * @throws InvalidArgumentException Thrown if default command is not set * @throws InvalidCommandException Thrown if default command is invalid */ - public static final function createHtmlCommandResolver ($commandName, ManageableApplication $applicationInstance) { + public static final function createHtmlCommandResolver ($commandName) { // Create the new instance $resolverInstance = new HtmlCommandResolver(); diff --git a/framework/main/classes/resolver/command/image/class_ImageCommandResolver.php b/framework/main/classes/resolver/command/image/class_ImageCommandResolver.php index a041d1d8..6b1b449b 100644 --- a/framework/main/classes/resolver/command/image/class_ImageCommandResolver.php +++ b/framework/main/classes/resolver/command/image/class_ImageCommandResolver.php @@ -54,12 +54,11 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve * Creates an instance of a Image command resolver with a given default command * * @param $commandName The default command we shall execute - * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared command resolver instance * @throws InvalidArgumentException Thrown if default command is not set * @throws InvalidCommandException Thrown if default command is invalid */ - public static final function createImageCommandResolver ($commandName, ManageableApplication $applicationInstance) { + public static final function createImageCommandResolver ($commandName) { // Create the new instance $resolverInstance = new ImageCommandResolver(); diff --git a/framework/main/classes/resolver/controller/console/class_ConsoleControllerResolver.php b/framework/main/classes/resolver/controller/console/class_ConsoleControllerResolver.php index d8db5dc3..eccd32d8 100644 --- a/framework/main/classes/resolver/controller/console/class_ConsoleControllerResolver.php +++ b/framework/main/classes/resolver/controller/console/class_ConsoleControllerResolver.php @@ -4,7 +4,6 @@ namespace Org\Mxchange\CoreFramework\Resolver\Controller; // Import framework stuff use Org\Mxchange\CoreFramework\Controller\BaseController; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver; use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver; @@ -52,12 +51,11 @@ class ConsoleControllerResolver extends BaseControllerResolver implements Contro * * @param $namespace Namespace to look in * @param $controllerName The controller we shall resolve - * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared controller resolver instance * @throws InvalidArgumentException Thrown if default controller is not set * @throws InvalidControllerException Thrown if default controller is invalid */ - public static final function createConsoleControllerResolver ($namespace, $controllerName, ManageableApplication $applicationInstance) { + public static final function createConsoleControllerResolver ($namespace, $controllerName) { // Create the new instance $resolverInstance = new ConsoleControllerResolver(); diff --git a/framework/main/classes/resolver/controller/html/class_HtmlControllerResolver.php b/framework/main/classes/resolver/controller/html/class_HtmlControllerResolver.php index 19189506..ae556aa6 100644 --- a/framework/main/classes/resolver/controller/html/class_HtmlControllerResolver.php +++ b/framework/main/classes/resolver/controller/html/class_HtmlControllerResolver.php @@ -4,7 +4,6 @@ namespace Org\Mxchange\CoreFramework\Resolver\Controller; // Import framework stuff use Org\Mxchange\CoreFramework\Controller\BaseController; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver; use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver; @@ -52,12 +51,11 @@ class HtmlControllerResolver extends BaseControllerResolver implements Controlle * * @param $namespace Namespace to look in * @param $controllerName The controller we shall resolve - * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared controller resolver instance * @throws InvalidArgumentException Thrown if default controller is not set * @throws InvalidControllerException Thrown if default controller is invalid */ - public static final function createHtmlControllerResolver ($namespace, $controllerName, ManageableApplication $applicationInstance) { + public static final function createHtmlControllerResolver ($namespace, $controllerName) { // Create the new instance $resolverInstance = new HtmlControllerResolver(); diff --git a/framework/main/classes/resolver/controller/image/class_ImageControllerResolver.php b/framework/main/classes/resolver/controller/image/class_ImageControllerResolver.php index 91ed2ccb..ddd151bb 100644 --- a/framework/main/classes/resolver/controller/image/class_ImageControllerResolver.php +++ b/framework/main/classes/resolver/controller/image/class_ImageControllerResolver.php @@ -4,7 +4,6 @@ namespace Org\Mxchange\CoreFramework\Resolver\Controller; // Import framework stuff use Org\Mxchange\CoreFramework\Controller\BaseController; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver; use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver; @@ -52,12 +51,11 @@ class ImageControllerResolver extends BaseControllerResolver implements Controll * * @param $namespace Namespace to look in * @param $controllerName The controller we shall resolve - * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared controller resolver instance * @throws InvalidArgumentException Thrown if default controller is not set * @throws InvalidControllerException Thrown if default controller is invalid */ - public static final function createImageControllerResolver ($namespace, $controllerName, ManageableApplication $applicationInstance) { + public static final function createImageControllerResolver ($namespace, $controllerName) { // Create the new instance $resolverInstance = new ImageControllerResolver(); diff --git a/framework/main/classes/template/class_BaseTemplateEngine.php b/framework/main/classes/template/class_BaseTemplateEngine.php index 01ff9a92..1908e3bc 100644 --- a/framework/main/classes/template/class_BaseTemplateEngine.php +++ b/framework/main/classes/template/class_BaseTemplateEngine.php @@ -9,6 +9,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException; use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; +use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Response\Responseable; // Import SPL stuff @@ -1212,10 +1213,12 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem { /** * Assigns all the application data with template variables * - * @param $applicationInstance A manageable application instance * @return void */ - public function assignApplicationData (ManageableApplication $applicationInstance) { + public function assignApplicationData () { + // Get application instance + $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + // Get long name and assign it $this->assignVariable('app_full_name' , $applicationInstance->getAppName()); diff --git a/framework/main/interfaces/template/class_CompileableTemplate.php b/framework/main/interfaces/template/class_CompileableTemplate.php index 480a25af..db9af6e1 100644 --- a/framework/main/interfaces/template/class_CompileableTemplate.php +++ b/framework/main/interfaces/template/class_CompileableTemplate.php @@ -4,7 +4,6 @@ namespace Org\Mxchange\CoreFramework\Template; // Import framework stuff use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Response\Responseable; /** @@ -138,10 +137,9 @@ interface CompileableTemplate extends FrameworkInterface { /** * Assigns all the application data with template variables * - * @param $applicationInstance A manageable application instance * @return void */ - function assignApplicationData (ManageableApplication $applicationInstance); + function assignApplicationData (); /** * "Compiles" a variable by replacing {?var?} with it's content diff --git a/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php b/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php index 9d61d50a..925bb04e 100644 --- a/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php +++ b/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php @@ -4,7 +4,6 @@ namespace Org\Mxchange\CoreFramework\Tests\Resolver\Command; // Import framework stuff use Org\Mxchange\CoreFramework\Command\InvalidCommandException; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Resolver\Command\BaseCommandResolver; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; @@ -51,12 +50,11 @@ class TestsConsoleCommandResolver extends BaseCommandResolver implements Command * Creates an instance of a TestsConsole command resolver with a given default command * * @param $commandName The default command we shall execute - * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared command resolver instance * @throws InvalidArgumentException Thrown if default command is not set * @throws InvalidCommandException Thrown if default command is invalid */ - public static final function createTestsConsoleCommandResolver ($commandName, ManageableApplication $applicationInstance) { + public static final function createTestsConsoleCommandResolver ($commandName) { // Create the new instance $resolverInstance = new TestsConsoleCommandResolver(); diff --git a/framework/main/tests/resolver/controller/class_TestsConsoleControllerResolver.php b/framework/main/tests/resolver/controller/class_TestsConsoleControllerResolver.php index 62c25405..ed861f35 100644 --- a/framework/main/tests/resolver/controller/class_TestsConsoleControllerResolver.php +++ b/framework/main/tests/resolver/controller/class_TestsConsoleControllerResolver.php @@ -5,7 +5,6 @@ namespace Org\Mxchange\CoreFramework\Tests\Resolver\Controller; // Import framework stuff use Org\Mxchange\CoreFramework\Controller\BaseController; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver; use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver; @@ -52,12 +51,11 @@ class TestsConsoleControllerResolver extends BaseControllerResolver implements C * Creates an instance of a resolver class with a given command * * @param $controllerName The controller we shall resolve - * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared controller resolver instance * @throws InvalidArgumentException Thrown if default command is not set * @throws InvalidControllerException Thrown if default controller is invalid */ - public static final function createTestsConsoleControllerResolver ($controllerName, ManageableApplication $applicationInstance) { + public static final function createTestsConsoleControllerResolver ($controllerName) { // Create the new instance $resolverInstance = new TestsConsoleControllerResolver(); diff --git a/index.php b/index.php index 1e7f1d48..e3c5da87 100644 --- a/index.php +++ b/index.php @@ -137,7 +137,7 @@ final class ApplicationEntryPoint { $applicationInstance = ApplicationHelper::getSelfInstance(); // Assign application data - $templateInstance->assignApplicationData($applicationInstance); + $templateInstance->assignApplicationData(); } // END - if // We only try this -- 2.39.5