示例#1
0
 public function RenderVariableContainer(IVariableContainer $variableContainer)
 {
     $values = array();
     $variableContainer->FillVariablesValues($values);
     $this->DisplayTemplate('variables_container.tpl', array(), array('Variables' => $values));
 }
 public static function EvaluateVariableTemplate(IVariableContainer $variableContainer, $template)
 {
     $result = $template;
     $values = array();
     $variableContainer->FillVariablesValues($values);
     foreach ($values as $name => $value) {
         $result = StringUtils::ReplaceVariableInTemplate($result, $name, $value);
     }
     return $result;
 }