From: Roland Häder Date: Tue, 24 Nov 2020 03:16:27 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4912e6f211de953a1e9c3244bfdb13df9934d777;p=city.git Continued: - language instance setting/getting is now done in non-monolithic FrameworkBootstrap and it makes more sense there, too - updated core framework Signed-off-by: Roland Häder --- 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