Converted more double-quotes to single. This causes some speed improvement as
[core.git] / inc / classes / main / template / class_BaseTemplateEngine.php
index ed47dbfae6d2a256f1bca7a547a0c78bdd6cbbdd..6b8145f46c629e939e4f9956b9ffa08d0e5998cf 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A generic template engine
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -178,7 +178,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // First everything is not found
                $found = FALSE;
 
-               // If the stack is null, use the current group
+               // If the stack is NULL, use the current group
                if (is_null($variableGroup)) {
                        // Use current group
                        //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.' currGroup=' . $this->currGroup . ' set as stack!');
@@ -253,7 +253,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // First everything is not found
                $content = NULL;
 
-               // If the stack is null, use the current group
+               // If the stack is NULL, use the current group
                if (is_null($variableGroup)) {
                        // Use current group
                        //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.' currGroup=' . $this->currGroup . ' set as stack!');
@@ -724,7 +724,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // 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",
+                       $fqfn = sprintf('%s%s%s%s/%s/%s%s',
                                $this->getConfigInstance()->getConfigEntry('base_path'),
                                $this->getTemplateBasePath(),
                                $this->getGenericBasePath(),
@@ -735,7 +735,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        );
                } else {
                        // Construct the FQFN for the template without language
-                       $fqfn = sprintf("%s%s%s%s/%s%s",
+                       $fqfn = sprintf('%s%s%s%s/%s%s',
                                $this->getConfigInstance()->getConfigEntry('base_path'),
                                $this->getTemplateBasePath(),
                                $this->getGenericBasePath(),
@@ -1256,7 +1256,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        $this->finalizeVariableCompilation();
 
                        // Prepare the eval() command for comiling the template
-                       $eval = sprintf("\$result = \"%s\";",
+                       $eval = sprintf('$result = "%s";',
                                addslashes($this->getRawTemplateData())
                        );
 
@@ -1276,14 +1276,14 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                                $evalRight = substr($evalRight, (strpos($evalRight, $this->codeEnd) + 2));
 
                                // And put all together
-                               $eval = sprintf("%s<%%php %s %%>%s", $evalLeft, $evalMiddle, $evalRight);
+                               $eval = sprintf('%s<%%php %s %%>%s', $evalLeft, $evalMiddle, $evalRight);
                        } // END - while
 
                        // Prepare PHP code for eval() command
                        $eval = str_replace(
-                               "<%php", "\";",
+                               '<%php', '";',
                                str_replace(
-                                       "%>",
+                                       '%>',
                                        "\n\$result .= \"",
                                        $eval
                                )
@@ -1295,7 +1295,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        // Goes something wrong?
                        if ((!isset($result)) || (empty($result))) {
                                // Output eval command
-                               self::createDebugInstance(__CLASS__)->debugOutput(sprintf("Failed eval() code: <pre>%s</pre>", $this->markupCode($eval, TRUE)), TRUE);
+                               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('Failed eval() code: <pre>%s</pre>', $this->markupCode($eval, TRUE)), TRUE);
 
                                // Output backtrace here
                                $this->debugBackTrace();