]> git.mxchange.org Git - core.git/blobdiff - inc/main/classes/template/class_BaseTemplateEngine.php
Continued:
[core.git] / inc / main / classes / template / class_BaseTemplateEngine.php
index 543bd88f6d182e44dd549f6e6174f2a7259f33a4..ccb352c979bf06bed9eba155cb6106db3dc753e5 100644 (file)
@@ -1,10 +1,17 @@
 <?php
+// Own namespace
+namespace CoreFramework\TemplateEngine;
+
+// Import framework stuff
+use CoreFramework\Manager\ManageableApplication;
+use CoreFramework\Object\BaseFrameworkSystem;
+
 /**
  * A generic template engine
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -674,29 +681,19 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        $ext = (string) $extOther;
                }
 
-               // Is language support enabled?
-               if ($this->isLanguageSupportEnabled()) {
-                       // Construct the FQFN for the template by honoring the current language
-                       $fqfn = sprintf('%s%s%s%s/%s/%s%s',
-                               $this->getConfigInstance()->getConfigEntry('base_path'),
-                               $this->getTemplateBasePath(),
-                               $this->getGenericBasePath(),
-                               $this->getLanguageInstance()->getLanguageCode(),
-                               $this->getTemplateType(),
-                               (string) $template,
-                               $ext
-                       );
-               } else {
-                       // Construct the FQFN for the template without language
-                       $fqfn = sprintf('%s%s%s%s/%s%s',
-                               $this->getConfigInstance()->getConfigEntry('base_path'),
-                               $this->getTemplateBasePath(),
-                               $this->getGenericBasePath(),
-                               $this->getTemplateType(),
-                               (string) $template,
-                               $ext
-                       );
-               }
+               /*
+                * Construct the FQFN for the template without language as language is
+                * now entirely done by php_intl. These old thing with language-based
+                * template paths comes from an older time.
+                */
+               $fqfn = sprintf('%s%s%s%s/%s%s',
+                       $this->getConfigInstance()->getConfigEntry('base_path'),
+                       $this->getTemplateBasePath(),
+                       $this->getGenericBasePath(),
+                       $this->getTemplateType(),
+                       (string) $template,
+                       $ext
+               );
 
                // First try this
                try {
@@ -1635,7 +1632,5 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // Return compacted content
                return $compactedContent;
        }
-}
 
-// [EOF]
-?>
+}