]> git.mxchange.org Git - core.git/commitdiff
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 a47ce6532e709be305d5fcd1cb1d642a82f45471..b0c73ee2865a0c179eb57346095559b78bd496d6 100644 (file)
@@ -1194,6 +1194,21 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                $this->setVariable('config', $variableName, $this->getConfigInstance()->getConfigEntry($variableName));
        }
 
+       /**
+        * 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
         *