3 * Smarty Internal Plugin Compile Setfilter
4 * Compiles code for setfilter tag
12 * Smarty Internal Plugin Compile Setfilter Class
15 * @subpackage Compiler
17 class Smarty_Internal_Compile_Setfilter extends Smarty_Internal_CompileBase
20 * Compiles code for setfilter tag
22 * @param array $args array with attributes from parser
23 * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
24 * @param array $parameter array with compilation parameter
26 * @return string compiled code
28 public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
30 $compiler->variable_filter_stack[] = $compiler->variable_filters;
31 $compiler->variable_filters = $parameter[ 'modifier_list' ];
32 // this tag does not return compiled code
33 $compiler->has_code = false;
40 * Smarty Internal Plugin Compile Setfilterclose Class
43 * @subpackage Compiler
45 class Smarty_Internal_Compile_Setfilterclose extends Smarty_Internal_CompileBase
48 * Compiles code for the {/setfilter} tag
49 * This tag does not generate compiled output. It resets variable filter.
51 * @param array $args array with attributes from parser
52 * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
54 * @return string compiled code
56 public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
58 $_attr = $this->getAttributes($compiler, $args);
59 // reset variable filter to previous state
60 if (count($compiler->variable_filter_stack)) {
61 $compiler->variable_filters = array_pop($compiler->variable_filter_stack);
63 $compiler->variable_filters = array();
65 // this tag does not return compiled code
66 $compiler->has_code = false;