]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/mail/class_MailTemplateEngine.php
Obsolete parameter 'applicationInstance' removed from all template engines
[core.git] / inc / classes / main / template / mail / class_MailTemplateEngine.php
index 1afb1f005efb3979bc2e26d69ffe32c764a40106..c4e49b22f580e106554f88b39c41ed704112c82c 100644 (file)
@@ -63,8 +63,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $appInstance    A manageable application
-        * @return      $templateInstance       An instance of TemplateEngine
+        * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
         * @throws      BasePathIsNoDirectoryException  If $templateBasePath is no
@@ -72,12 +71,15 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createMailTemplateEngine (ManageableApplication $appInstance) {
+       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') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {