X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fcity%2Fclasses%2Fcommands%2Fhtml%2Fclass_CityHtmlLoginAreaCommand.php;h=d4f5a9f0bc8e178e09655fc252cda6d0b3c5811e;hb=ce05c4a9aa076a7ea569aeec7861b5d97d797ec6;hp=8888a092debd83b4bd8995710c6cb8a4b1b03353;hpb=e846ee2bfd5833a9df8da8c5445ef7b445dcfdee;p=city.git diff --git a/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php index 8888a09..d4f5a9f 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php @@ -1,10 +1,23 @@ * @version 0.0.0 - * @copyright Copyright (c) 2015 City Developer Team + * @copyright Copyright (c) 2015, 2016 City Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -75,7 +88,7 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get the action instance from registry - $actionInstance = Registry::getRegistry()->getInstance('action'); + $actionInstance = GenericRegistry::getRegistry()->getInstance('action'); // Do we have an action here? if ($actionInstance instanceof PerformableAction) { @@ -84,7 +97,7 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { } // END - if // Get the application instance - $applicationInstance = $this->getResolverInstance()->getApplicationInstance(); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Prepare a template instance $templateInstance = $this->prepareTemplateInstance($applicationInstance); @@ -93,7 +106,7 @@ class CityHtmlLoginAreaCommand 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(); @@ -130,7 +143,7 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { $templateInstance->loadCodeTemplate($masterTemplate); // Set title - $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage($this->actionName . '_title')); + $templateInstance->assignVariable('title', FrameworkBootstrap::getLanguageInstance()->getMessage($this->actionName . '_title')); // Construct the menu in every command. We could do this in BaseCommand class. But this means // *every* command has a navigation system and that is want we don't want. @@ -165,13 +178,13 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { $actionInstance = NULL; // Get registry - $registryInstance = Registry::getRegistry(); + $registryInstance = GenericRegistry::getRegistry(); // Get our application instance from the registry $applicationInstance = $registryInstance->getInstance('application'); // Default action is the one from configuration - $this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $this->getConfigInstance()->getConfigEntry('login_default_action'); + $this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_default_action'); // Get "action" from request $actReq = $requestInstance->getRequestElement('action'); @@ -182,11 +195,8 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { $this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $actReq; } // END - if - // Get application instance - $applicationInstance = $this->getResolverInstance()->getApplicationInstance(); - // Get a resolver - $actionResolver = HtmlActionResolver::createHtmlActionResolver($this->actionName, $applicationInstance); + $actionResolver = HtmlActionResolver::createHtmlActionResolver($this->actionName); // Resolve the action $actionInstance = $actionResolver->resolveAction(); @@ -195,9 +205,7 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { $actionInstance->addExtraFilters($controllerInstance, $requestInstance); // Remember this action in registry - Registry::getRegistry()->addInstance('action', $actionInstance); + GenericRegistry::getRegistry()->addInstance('action', $actionInstance); } -} -// [EOF] -?> +}