core code merged, interfaces OutputStreamer implemented
[shipsimu.git] / inc / classes / main / template / class_TemplateEngine.php
index 62d78cbe27be43146cb89c82401c66ed35e624a8..74542634f7466235ec2e3b87e8a5547df81c6ce3 100644 (file)
@@ -3,10 +3,11 @@
  * The own template engine for loading caching and sending out the web pages
  * and emails.
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0
+ * @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
@@ -136,16 +137,16 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         *
         * @param               $basePath               The local base path for all templates
         * @param               $langInstance   An instance of LanguageSystem (default)
-        * @param               $ioInstance             An instance of FileIOHandler (default, middleware!)
-        * @return              $tplInstance    An instance of TemplateEngine
-        * @throws              BasePathIsEmptyException                If the provided $basePath is empty
-        * @throws              InvalidBasePathStringException  If $basePath is no string
-        * @throws              BasePathIsNoDirectoryException  If $basePath is no
-        *                                                                                              directory or not found
-        * @throws              BasePathReadProtectedException  If $basePath is
-        *                                                                                              read-protected
+        * @param               $ioInstance     An instance of FileIOHandler (default, middleware!)
+        * @return      $tplInstance    An instance of TemplateEngine
+        * @throws      BasePathIsEmptyException                If the provided $basePath is empty
+        * @throws      InvalidBasePathStringException  If $basePath is no string
+        * @throws      BasePathIsNoDirectoryException  If $basePath is no
+        *                                                                              directory or not found
+        * @throws      BasePathReadProtectedException  If $basePath is
+        *                                                                              read-protected
         */
-       public final static function createTemplateEngine ($basePath, ManageableLanguage $langInstance, FileIOHandler $fileIOInstance) {
+       public final static function createTemplateEngine ($basePath, $langInstance, $ioInstance) {
                // Get a new instance
                $tplInstance = new TemplateEngine();
 
@@ -175,7 +176,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
 
                // Set the language and IO instances
                $tplInstance->setLanguageInstance($langInstance);
-               $tplInstance->setIOInstance($fileIOInstance);
+               $tplInstance->setIOInstance($ioInstance);
 
                // Set template extensions
                $tplInstance->setRawTemplateExtension($cfgInstance->readConfig("raw_template_extension"));
@@ -483,7 +484,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         * Private setter for raw template data
         *
         * @param               $rawTemplateData        The raw data from the template
-        * @return              void
+        * @return      void
         */
        private final function setRawTemplateData ($rawTemplateData) {
                // Cast it to string