append_subtree example

199 => 199,
        200 => 200,
        201 => 201,
    );
#line 95 "smarty_internal_templateparser.y"     function yy_r0(){
    $this->_retvalue = $this->root_buffer->to_smarty_php();
    }
#line 2160 "smarty_internal_templateparser.php" #line 103 "smarty_internal_templateparser.y"     function yy_r1(){
    $this->current_buffer->append_subtree($this->yystack[$this->yyidx + 0]->minor);
    }
#line 2165 "smarty_internal_templateparser.php" #line 119 "smarty_internal_templateparser.y"     function yy_r4(){
    if ($this->compiler->has_code) {
        $tmp =''; foreach ($this->compiler->prefix_code as $code) {$tmp.=$code;} $this->compiler->prefix_code=array();
        $this->_retvalue = new _smarty_tag($this$this->compiler->processNocacheCode($tmp.$this->yystack[$this->yyidx + 0]->minor,true));
    } else {
        $this->_retvalue = new _smarty_tag($this$this->yystack[$this->yyidx + 0]->minor);
    }
    $this->compiler->has_variable_string = false;
    
$output = '';
        } else {
            $output = "<?php if (!function_exists('smarty_template_function_{$_name}')) { function smarty_template_function_{$_name}(\$_smarty_tpl,\$params) { \$saved_tpl_vars = \$_smarty_tpl->tpl_vars; foreach (\$_smarty_tpl->smarty->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}; foreach (\$params as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}?>";
        }
        // Init temporay context         $compiler->template->required_plugins = array('compiled' => array(), 'nocache' => array());
        $compiler->parser->current_buffer = new _smarty_template_buffer($compiler->parser);
        $compiler->parser->current_buffer->append_subtree(new _smarty_tag($compiler->parser, $output));
        $compiler->template->has_nocache_code = false;
        $compiler->has_code = false;
        $compiler->template->properties['function'][$_name]['compiled'] = '';
        return true;
    }

}

/** * Smarty Internal Plugin Compile Functionclose Class * * @package Smarty * @subpackage Compiler */
Home | Imprint | This part of the site doesn't use cookies.