X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ftemplate%2Fmail%2Fclass_MailTemplateEngine.php;h=c4e49b22f580e106554f88b39c41ed704112c82c;hp=eda00738babd1365478b81bb8adb4645b2b8bfbf;hb=36a96a3b68cb6da4e1b431fbc5983821de918618;hpb=ec6bb7da038135934f0d5abfcb82a7a7780945a4 diff --git a/inc/classes/main/template/mail/class_MailTemplateEngine.php b/inc/classes/main/template/mail/class_MailTemplateEngine.php index eda00738..c4e49b22 100644 --- a/inc/classes/main/template/mail/class_MailTemplateEngine.php +++ b/inc/classes/main/template/mail/class_MailTemplateEngine.php @@ -63,7 +63,6 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla /** * 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 @@ -72,10 +71,13 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla * @throws BasePathReadProtectedException If $templateBasePath is * read-protected */ - public static final function createMailTemplateEngine (ManageableApplication $applicationInstance) { + public static final function createMailTemplateEngine () { // Get a new instance $templateInstance = new MailTemplateEngine(); + // 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') . '/';