]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/console/class_ConsoleTemplateEngine.php
Opps, forgot this.
[core.git] / inc / classes / main / template / console / class_ConsoleTemplateEngine.php
index 0a9bc8dc5f022fb22006b3c476f9c1d04efd54c7..4a55c27342b5ef66a091b70b673790902f2f8f49 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A Console template engine class
  *
- * @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 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
  *
  * This program is free software: you can redistribute it and/or modify
@@ -36,7 +36,6 @@ class ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem
        /**
         * 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 ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createConsoleTemplateEngine (ManageableApplication $applicationInstance) {
+       public static final function createConsoleTemplateEngine () {
                // Get a new instance
                $templateInstance = new ConsoleTemplateEngine();
 
+               // 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') . '/';