From 4912e6f211de953a1e9c3244bfdb13df9934d777 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 24 Nov 2020 04:16:27 +0100 Subject: [PATCH] Continued: - language instance setting/getting is now done in non-monolithic FrameworkBootstrap and it makes more sense there, too - updated core framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- application/city/class_ApplicationHelper.php | 2 +- .../classes/commands/html/class_CityHtmlConfirmCommand.php | 3 ++- .../classes/commands/html/class_CityHtmlLoginAreaCommand.php | 3 ++- .../city/classes/commands/html/class_CityHtmlLoginCommand.php | 3 ++- .../classes/commands/html/class_CityHtmlLoginFailedCommand.php | 3 ++- .../classes/commands/html/class_CityHtmlLogoutDoneCommand.php | 3 ++- core | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/application/city/class_ApplicationHelper.php b/application/city/class_ApplicationHelper.php index 9156d89..aad8388 100644 --- a/application/city/class_ApplicationHelper.php +++ b/application/city/class_ApplicationHelper.php @@ -146,7 +146,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication $languageInstance = ObjectFactory::createObjectByConfiguredName('language_system_class'); // And set it here - $this->setLanguageInstance($languageInstance); + FrameworkBootstrap::setLanguageInstance($languageInstance); // Is html request? if (FrameworkBootstrap::getRequestTypeFromSystem() == 'html') { diff --git a/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php b/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php index e6ae502..8888756 100644 --- a/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\City\Command; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; @@ -111,7 +112,7 @@ class CityHtmlConfirmCommand extends BaseCommand implements Commandable { $templateInstance->loadCodeTemplate($masterTemplate); // Set title - $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_confirm_link_title')); + $templateInstance->assignVariable('title', FrameworkBootstrap::getLanguageInstance()->getMessage('page_confirm_link_title')); // Get user instance try { diff --git a/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php index bfa8ca1..70ae9d4 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\City\Command; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; @@ -141,7 +142,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. diff --git a/application/city/classes/commands/html/class_CityHtmlLoginCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginCommand.php index cf31dc8..7446134 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginCommand.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\City\Command; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; @@ -113,7 +114,7 @@ class CityHtmlLoginCommand extends BaseCommand implements Commandable, Registera $templateInstance->loadCodeTemplate($masterTemplate); // Set title - $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_login_title')); + $templateInstance->assignVariable('title', FrameworkBootstrap::getLanguageInstance()->getMessage('page_login_title')); /* * Construct the menu in every command. We could do this in BaseCommand class. But this means diff --git a/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php index 4b61af9..ce21d18 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\City\Command; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; @@ -106,7 +107,7 @@ class CityHtmlLoginFailedCommand extends BaseCommand implements Commandable { $templateInstance->loadCodeTemplate($masterTemplate); // Set title - $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('login_failed_title')); + $templateInstance->assignVariable('title', FrameworkBootstrap::getLanguageInstance()->getMessage('login_failed_title')); // Assign base URL $templateInstance->assignConfigVariable('base_url'); diff --git a/application/city/classes/commands/html/class_CityHtmlLogoutDoneCommand.php b/application/city/classes/commands/html/class_CityHtmlLogoutDoneCommand.php index 0c5ee61..d9dac7a 100644 --- a/application/city/classes/commands/html/class_CityHtmlLogoutDoneCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLogoutDoneCommand.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\City\Command; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; @@ -106,7 +107,7 @@ class CityHtmlLogoutDoneCommand extends BaseCommand implements Commandable { $templateInstance->loadCodeTemplate($masterTemplate); // Set title - $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('logout_done_title')); + $templateInstance->assignVariable('title', FrameworkBootstrap::getLanguageInstance()->getMessage('logout_done_title')); // Assign base URL $templateInstance->assignConfigVariable('base_url'); diff --git a/core b/core index df3701b..8a70226 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit df3701b7230349ee2bc711caba98809ac943363c +Subproject commit 8a70226bd287a3f13b27932e2ec88d16c51c7e39 -- 2.39.5