30 public static function compile($_function, $_attr, $_template, $_script, $_assign = null)
33 if ($_script !=
'null') {
36 $_output .=
"require_once '{$_script}';";
39 if (isset($_assign)) {
40 $_output .=
"\$_smarty_tpl->assign('{$_assign}' , {$_function} (" . var_export($_attr,
true) .
",\$_smarty_tpl), true);?>";
42 $_output .=
"echo {$_function}(" . var_export($_attr,
true) .
",\$_smarty_tpl);?>";
46 $_tpl = $_tpl->parent;
48 return "/*%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/" . $_output .
"/*/%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/";
static compile($_function, $_attr, $_template, $_script, $_assign=null)
Compiles code for the {insert} tag into cache file.