'defun' plugin about smarty in detail? (Design/Themes)

by micsi, Thursday, April 24, 2008, 14:05 (5843 days ago) @ micsi
edited by Alfie, Thursday, April 24, 2008, 21:40

Any one can help me to analyze this function and about plugin about 'defun'!
Thank you all the same!!!:-)

/* create code for closing a function definition and calling said function */
function smarty_compiler_defun_close($tag_args, &$compiler) {
    list($name, $attrs, $open_tag_args, $func_key) = array_pop($compiler->_tag_stack);
    if ($name!='defun') $compiler->_syntax_error("unexpected {/defun}");
    return " $this->_tpl_vars = $_fun_tpl_vars; }} " . $func_key . smarty_compiler_fun($open_tag_args, $compiler);
}
$this->register_compiler_function('/defun', 'smarty_compiler_defun_close');

--
Edit: linked to old thread; syntax highlighting activated. [Alfie]

locked
5724 views

Complete thread:

 RSS Feed of thread