3 * Smarty Internal Plugin Compile Object Block Function
4 * Compiles code for registered objects as block function
12 * Smarty Internal Plugin Compile Object Block Function Class
15 * @subpackage Compiler
17 class Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Internal_Compile_Private_Block_Plugin
20 * Setup callback and parameter array
22 * @param \Smarty_Internal_TemplateCompilerBase $compiler
23 * @param array $_attr attributes
25 * @param string $method
29 public function setup(Smarty_Internal_TemplateCompilerBase $compiler, $_attr, $tag, $method)
31 $_paramsArray = array();
32 foreach ($_attr as $_key => $_value) {
34 $_paramsArray[] = "$_key=>$_value";
36 $_paramsArray[] = "'$_key'=>$_value";
39 $callback = array("\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]", "->{$method}");
40 return array($callback, $_paramsArray, "array(\$_block_plugin{$this->nesting}, '{$method}')");