51 $this->required_attributes = array(
'var');
52 $this->optional_attributes = array(
'assign');
55 if (isset($_attr[
'assign'])) {
57 $_assign = $_attr[
'assign'];
61 $_output =
"\$_template = new {$compiler->smarty->template_class}('eval:'.".$_attr[
'var'].
", \$_smarty_tpl->smarty, \$_smarty_tpl);";
63 if (isset($_assign)) {
64 $_output .=
"\$_smarty_tpl->assign($_assign,\$_template->fetch());";
66 $_output .=
"echo \$_template->fetch();";
68 return "<?php $_output ?>";
getAttributes($compiler, $attributes)
This function checks if the attributes passed are valid.
compile($args, $compiler)
Compiles code for the {eval} tag.