]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/template/class_BaseTemplateEngine.php
Continued a bit:
[core.git] / framework / main / classes / template / class_BaseTemplateEngine.php
index fd116e5cf166fa48a410e50b79ef68b541b09d78..a233e776e1e2386812a0efc8bf2d2f30b5e91968 100644 (file)
@@ -4,6 +4,7 @@ namespace CoreFramework\Template\Engine;
 
 // Import framework stuff
 use CoreFramework\Bootstrap\FrameworkBootstrap;
+use CoreFramework\EntryPoint\ApplicationEntryPoint;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Filesystem\FileNotFoundException;
 use CoreFramework\Generic\EmptyVariableException;
@@ -671,12 +672,12 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
        /**
         * Private loader for all template types
         *
-        * @param       $template       The template we shall load
+        * @param       $templateName   The template we shall load
         * @param       $extOther       An other extension to use
         * @return      void
         * @throws      FileNotFoundException   If the template was not found
         */
-       protected function loadTemplate ($template, $extOther = '') {
+       protected function loadTemplate ($templateName, $extOther = '') {
                // Get extension for the template if empty
                if (empty($extOther)) {
                        // None provided, so get the raw one
@@ -691,12 +692,12 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                 * 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('application_base_path'),
+               $fqfn = sprintf('%s%s%s%s%s%s',
                        $this->getTemplateBasePath(),
                        $this->getGenericBasePath(),
                        $this->getTemplateType(),
-                       (string) $template,
+                       DIRECTORY_SEPARATOR,
+                       (string) $templateName,
                        $ext
                );
 
@@ -711,7 +712,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                                $ext = $this->getCodeTemplateExtension();
 
                                // Try it again...
-                               $this->loadTemplate($template, $ext);
+                               $this->loadTemplate($templateName, $ext);
                        } else {
                                // Throw it again
                                throw new FileNotFoundException($fqfn, self::EXCEPTION_FILE_NOT_FOUND);
@@ -986,7 +987,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                                $this->assignVariable($var, $varMatches[3][$key]);
                        } elseif (!empty($varMatches[2][$key])) {
                                // @TODO Non-string found so we need some deeper analysis...
-                               ApplicationEntryPoint::app_exit('Deeper analysis not yet implemented!');
+                               ApplicationEntryPoint::exitApplication('Deeper analysis not yet implemented!');
                        }
                } // END - foreach
        }