]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/web/class_WebTemplateEngine.php
Added new interfaces Handleable/-DataSet and ProtocolHandler (no content yet).
[core.git] / inc / classes / main / template / web / class_WebTemplateEngine.php
index e4846a815490cb26e5e3a41532cc7078d69a0bc7..7e4a6ef1f50ec909aaa96e66b68dbf4148743680 100644 (file)
@@ -3,11 +3,11 @@
  * The own template engine for loading caching and sending out the web pages
  * and emails.
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.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
@@ -36,7 +36,6 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $applicationInstance    A manageable application
         * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
@@ -45,10 +44,13 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createWebTemplateEngine (ManageableApplication $applicationInstance) {
+       public static final function createWebTemplateEngine () {
                // Get a new instance
                $templateInstance = new WebTemplateEngine();
 
+               // Get the application instance from registry
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
+
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';