]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/mail/class_MailTemplateEngine.php
Copyright updated
[core.git] / inc / classes / main / template / mail / class_MailTemplateEngine.php
index cfbd7b591c476082baf31846b6be01e0bafb6aee..f4b4f692083530d8bb20d3c1ad7fb6625e199c10 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  * @todo               This template engine does not make use of setTemplateType()
@@ -72,7 +72,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public final static function createMailTemplateEngine (ManageableApplication $appInstance) {
+       public static final function createMailTemplateEngine (ManageableApplication $appInstance) {
                // Get a new instance
                $templateInstance = new MailTemplateEngine();
 
@@ -98,9 +98,6 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                        throw new BasePathReadProtectedException(array($templateInstance, $templateBasePath), self::EXCEPTION_READ_PROTECED_PATH);
                }
 
-               // Get configuration instance
-               $configInstance = FrameworkConfiguration::getInstance();
-
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
@@ -109,11 +106,11 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $templateInstance->setFileIoInstance($ioInstance);
 
                // Set template extensions
-               $templateInstance->setRawTemplateExtension($configInstance->getConfigEntry('raw_template_extension'));
-               $templateInstance->setCodeTemplateExtension($configInstance->getConfigEntry('code_template_extension'));
+               $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
+               $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $templateInstance->setCompileOutputPath($configInstance->getConfigEntry('base_path') . $configInstance->getConfigEntry('compile_output_path'));
+               $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path'));
 
                // Return the prepared instance
                return $templateInstance;