]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/web/class_WebTemplateEngine.php
Copyright updated
[core.git] / inc / classes / main / template / web / class_WebTemplateEngine.php
index b2377a999e6f745718308df128ea9c2e0890ef30..6033ef59d69cd2448f39d7ba03d719ea66312d64 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 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
  *
@@ -45,7 +45,7 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public final static function createWebTemplateEngine (ManageableApplication $appInstance) {
+       public static final function createWebTemplateEngine (ManageableApplication $appInstance) {
                // Get a new instance
                $templateInstance = new WebTemplateEngine();
 
@@ -71,9 +71,6 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
                        throw new BasePathReadProtectedException(array($templateInstance, $templateBasePath), self::EXCEPTION_READ_PROTECED_PATH);
                }
 
-               // Get configuration instance
-               $configInstance = FrameworkConfiguration::getInstance();
-
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
@@ -82,11 +79,11 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
                $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;