]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/class_BaseTemplateEngine.php
Improved some debug messages with method's name.
[core.git] / inc / classes / main / template / class_BaseTemplateEngine.php
index a47ce6532e709be305d5fcd1cb1d642a82f45471..e2cb11f6221fa76b6ee0db993efa4d48496b5c69 100644 (file)
@@ -1194,6 +1194,24 @@ 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) {
+               // "Inject" all
+               foreach ($variables as $name => $value) {
+                       // Set variable with name for 'config' group
+                       $this->setVariable('config', $name, $value);
+               } // END - foreach
+       }
+
        /**
         * Assigns all the application data with template variables
         *