]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 12 Dec 2021 08:08:23 +0000 (09:08 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 12 Dec 2021 08:08:23 +0000 (09:08 +0100)
- renamed $tpl to $templateClassName (very old code here) as it is part of the
  framework
- updated 'core' framework

Signed-off-by: Roland Häder <roland@mxchange.org>
core
index.php

diff --git a/core b/core
index 7ffdc10bef06624ca2c6cf58e1109f880bbbf13e..b580ca852dc945d23290a6f7fb2c77e7c52e0d4b 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 7ffdc10bef06624ca2c6cf58e1109f880bbbf13e
+Subproject commit b580ca852dc945d23290a6f7fb2c77e7c52e0d4b
index 46f5db5e3db33873e9aabba507ef3140aeb84367..c5ee29a3c69b0240996ef5c6b4f8f0f01b4c847d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -8,6 +8,7 @@ use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Localization\LanguageSystem;
+use Org\Mxchange\CoreFramework\Localization\ManageableLanguage;
 use Org\Mxchange\CoreFramework\Loader\ClassLoader;
 use Org\Mxchange\CoreFramework\Generic\FrameworkException;
 
@@ -83,7 +84,7 @@ final class ApplicationEntryPoint {
                }
 
                // Get some instances
-               $tpl = $configInstance->getConfigEntry('html_template_class');
+               $templateClassName = $configInstance->getConfigEntry('html_template_class');
                $languageInstance = LanguageSystem::getSelfInstance();
 
                // Initialize template instance here to avoid warnings in IDE
@@ -93,11 +94,11 @@ final class ApplicationEntryPoint {
                $responseInstance = FrameworkBootstrap::getResponseInstance();
 
                // Is the template engine loaded?
-               if ((class_exists($tpl)) && (is_object($languageInstance))) {
+               if ((class_exists($templateClassName)) && ($languageInstance instanceof ManageableLanguage)) {
                        // Use the template engine for putting out (nicer look) the message
                        try {
                                // Get the template instance from our object factory
-                               $templateInstance = ObjectFactory::createObjectByName($tpl);
+                               $templateInstance = ObjectFactory::createObjectByName($templateClassName);
                        } catch (FrameworkException $e) {
                                exit(sprintf('[Main:] Could not initialize template engine for reason: <span class="exception_reason">%s</span>',
                                        $e->getMessage()