Added injectConfigVariables(), please do use with great causion.
authorRoland Haeder <roland@mxchange.org>
Sun, 9 Feb 2014 00:59:05 +0000 (01:59 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 9 Feb 2014 00:59:05 +0000 (01:59 +0100)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/classes/main/template/class_BaseTemplateEngine.php

index a47ce65..b0c73ee 100644 (file)
@@ -1195,6 +1195,21 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
        }
 
        /**
+        * Injects an array of config variables into the stack of currently loaded
+        * template. This method should only be used in very rare circumstances,
+        * e.g. when you have to copy a whole set of variables into the template
+        * engine. Before you use this method, please make sure you have considered
+        * all other possiblities.
+        *
+        * @param       $variables      An array with variables to be injected
+        * @return      void
+        */
+       public function injectConfigVariables (array $variables) {
+               // Set it
+               $this->varStack['config'] = $variables;
+       }
+
+       /**
         * Assigns all the application data with template variables
         *
         * @param       $applicationInstance    A manageable application instance