]> git.mxchange.org Git - mailer.git/blobdiff - inc/classes/main/template/class_TemplateEngine.php
Copyrights added
[mailer.git] / inc / classes / main / template / class_TemplateEngine.php
index 253cc86e22bb7886003e9b06ebeaef97069a81c0..74542634f7466235ec2e3b87e8a5547df81c6ce3 100644 (file)
@@ -2,6 +2,25 @@
 /**
  * The own template engine for loading caching and sending out the web pages
  * and emails.
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @version            0.3.0
+ * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate {
        /**
@@ -88,7 +107,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         * E.g.: {?template:variable=value;var2=value2;[...]?}
         */
        private $regExpCodeTags = '/\{\?([a-z_]+)(:("[^"]+"|[^?}]+)+)?\?\}/';
-        
+
        // Exception codes for the template engine
        const EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED   = 0xa00;
        const TEMPLATE_CONTAINS_INVALID_VAR_EXCEPTION = 0xa01;
@@ -245,7 +264,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
        public final function initVariableStack () {
                $this->varStack = new FrameworkArrayObject();
        }
-        
+
        /**
         * Setter for language instance which should be LanguageSystem
         *
@@ -255,7 +274,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
        public final function setLanguageInstance (ManageableLanguage $langInstance) {
                $this->langInstance = $langInstance;
        }
-        
+
        /**
         * Setter for file I/O instance which should be FileIOHandler
         *
@@ -265,7 +284,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
        public final function setIOInstance (FileIOHandler $ioInstance) {
                $this->ioInstance = $ioInstance;
        }
-        
+
        /**
         * Getter for file I/O instance which should be FileIOHandler
         *
@@ -389,7 +408,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
        public final function getTemplateType () {
                return $this->templateType;
        }
-        
+
        /**
         * Setter for the last loaded template's FQFN
         *
@@ -401,7 +420,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
                $template = (string) $template;
                $this->lastTemplate = $template;
        }
-        
+
        /**
         * Getter for the last loaded template's FQFN
         *
@@ -410,7 +429,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
        private final function getLastTemplate () {
                return $this->lastTemplate;
        }
-       
+
        /**
         * Assign (add) a given variable with a value
         *
@@ -431,7 +450,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
                        $this->modifyVariable($var, $value);
                }
        }
-       
+
        /**
         * Assign a given congfiguration variable with a value
         *
@@ -443,7 +462,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
                // Sweet and simple...
                $this->configVariables[$var] = $value;
        }
-       
+
        /**
         * Removes a given variable
         *
@@ -930,7 +949,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
                // Run the constructed command. This will "compile" all variables in
                eval($eval);
        }
-        
+
        /**
         * Compile all required templates into the current loaded one
         *