]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/mail/class_MailTemplateEngine.php
Copyright updated
[core.git] / inc / classes / main / template / mail / class_MailTemplateEngine.php
index eda00738babd1365478b81bb8adb4645b2b8bfbf..0e5ce76074db42e84c72a3d4798a89a7ec309a99 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.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 - 2012 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  * @todo               This template engine does not make use of setTemplateType()
@@ -43,7 +43,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
        /**
         * Mailer instance
         */
-       private $mailerInstance = null;
+       private $mailerInstance = NULL;
 
        /**
         * Current main node
@@ -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') . '/';
 
@@ -319,7 +321,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
        public function getMailCacheFqfn () {
                // Initialize FQFN
                $fqfn = '';
-               $this->debugBackTrace();
+               $this->debugBackTrace('Unfinished area!');
 
                // Return it
                return $fqfn;