/** * @brief This is our template processor. * * @param string|SmartyEngine $s the string requiring macro substitution, * or an instance of SmartyEngine * @param array $r key value pairs (search => replace) * @return string substituted string */ function replace_macros($s, $r) { $arr = array('template' => $s, 'params' => $r); call_hooks('replace_macros', $arr); $t = App::template_engine(); $output = $t->replace_macros($arr['template'], $arr['params']); return $output; }
function get_markup_template($s, $root = '') { $t = App::template_engine(); $template = $t->get_markup_template($s, $root); return $template; }