X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ftemplate%2Fconsole%2Fclass_ConsoleTemplateEngine.php;h=15f2f8f34a53367d077afc0c86ab79f58aef222e;hp=0a9bc8dc5f022fb22006b3c476f9c1d04efd54c7;hb=36a96a3b68cb6da4e1b431fbc5983821de918618;hpb=0b2b0ac80d0ba61509b37d971a4ca66e95653298 diff --git a/inc/classes/main/template/console/class_ConsoleTemplateEngine.php b/inc/classes/main/template/console/class_ConsoleTemplateEngine.php index 0a9bc8dc..15f2f8f3 100644 --- a/inc/classes/main/template/console/class_ConsoleTemplateEngine.php +++ b/inc/classes/main/template/console/class_ConsoleTemplateEngine.php @@ -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') . '/';