Obsolete parameter 'applicationInstance' removed from all template engines
[core.git] / inc / classes / main / template / console / class_ConsoleTemplateEngine.php
index 0a9bc8dc5f022fb22006b3c476f9c1d04efd54c7..15f2f8f34a53367d077afc0c86ab79f58aef222e 100644 (file)
@@ -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') . '/';