]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/class_BaseTemplateEngine.php
getCompiledData() must be public for e.g. mailer classes such as DebugMailer.
[core.git] / inc / classes / main / template / class_BaseTemplateEngine.php
index 68be4dcb037bcc35e979ad63e98999bbb810cca2..a447eb578b58bbc842d3dc51b87e90e2e11a7fdf 100644 (file)
@@ -647,11 +647,11 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
        }
 
        /**
-        * Getter for compiled templates
+        * Getter for compiled templates, must be public for e.g. Mailer classes.
         *
         * @return      $compiledData   Compiled template data
         */
-       protected final function getCompiledData () {
+       public final function getCompiledData () {
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($this->compiledData) . ' Bytes read.');
                return $this->compiledData;
        }
@@ -1238,6 +1238,21 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                $this->loadTemplate($template);
        }
 
+       /**
+        * Load a specified email template into the engine
+        *
+        * @param       $template       The email template we shall load which is
+        *                                              located in 'emails' by default
+        * @return      void
+        */
+       public function loadEmailTemplate ($template) {
+               // Set template type
+               $this->setTemplateType($this->getConfigInstance()->getConfigEntry('email_template_type'));
+
+               // Load the special template
+               $this->loadTemplate($template);
+       }
+
        /**
         * Compiles configuration place-holders in all variables. This 'walks'
         * through the variable group 'general'. It interprets all values from that