]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/class_BaseTemplateEngine.php
Some cleanups, more usage of ObjectFactory:
[core.git] / inc / classes / main / template / class_BaseTemplateEngine.php
index d31f5cfd6127dd026cc4c64823a6816cc5fe3f3c..3e265df6488b99b950e6043a911d4fbe19542753 100644 (file)
@@ -87,12 +87,12 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
        /**
         * Loaded raw template data
         */
-       private $loadedRawData = null;
+       private $loadedRawData = NULL;
 
        /**
         * Raw templates which are linked in code templates
         */
-       private $rawTemplates = null;
+       private $rawTemplates = NULL;
 
        /**
         * A regular expression for variable=value pairs
@@ -171,7 +171,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         * @param       $stack  Optional variable stack to look in
         * @return      $index  FALSE means not found, >=0 means found on a specific index
         */
-       private function getVariableIndex ($var, $stack = null) {
+       private function getVariableIndex ($var, $stack = NULL) {
                // First everything is not found
                $found = false;
 
@@ -239,9 +239,9 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         * @param       $stack          Optional variable stack to look in
         * @return      $content        Content of the variable or null if not found
         */
-       protected function readVariable ($var, $stack = null) {
+       protected function readVariable ($var, $stack = NULL) {
                // First everything is not found
-               $content = null;
+               $content = NULL;
 
                // If the stack is null, use the current group
                if (is_null($stack)) $stack = $this->currGroup;
@@ -1168,7 +1168,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                $$validVar = $dummy;
 
                // Prepare all configuration variables
-               $config = null;
+               $config = NULL;
                if ($this->isVarStackSet('config')) {
                        $config = $this->getVarStack('config');
                } // END - if
@@ -1444,7 +1444,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         * @return      void
         * @throws      XmlParserException      If an XML error was found
         */
-       public function renderXmlContent ($content = null) {
+       public function renderXmlContent ($content = NULL) {
                // Is the content set?
                if (is_null($content)) {
                        // Get current content
@@ -1524,6 +1524,9 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        } // END - foreach
                } // END - if
 
+               // Set the content again
+               $this->setRawTemplateData($compactedContent);
+
                // Return compacted content
                return $compactedContent;
        }