Commit | Line | Data |
---|---|---|
ccd27f54 S |
1 | <?php |
2 | /** | |
cd8826ea S |
3 | * Smarty Internal Plugin Templateparser Parse Tree |
4 | * These are classes to build parse trees in the template parser | |
ccd27f54 S |
5 | * |
6 | * @package Smarty | |
7 | * @subpackage Compiler | |
8 | * @author Thue Kristensen | |
9 | * @author Uwe Tews | |
10 | */ | |
11 | ||
12 | /** | |
13 | * Code fragment inside a tag . | |
14 | * | |
15 | * @package Smarty | |
16 | * @subpackage Compiler | |
17 | * @ignore | |
18 | */ | |
19 | class Smarty_Internal_ParseTree_Code extends Smarty_Internal_ParseTree | |
20 | { | |
21 | /** | |
22 | * Create parse tree buffer for code fragment | |
23 | * | |
24 | * @param object $parser parser object | |
25 | * @param string $data content | |
26 | */ | |
27 | public function __construct($parser, $data) | |
28 | { | |
29 | $this->parser = $parser; | |
30 | $this->data = $data; | |
31 | } | |
32 | ||
33 | /** | |
34 | * Return buffer content in parentheses | |
35 | * | |
36 | * @return string content | |
37 | */ | |
38 | public function to_smarty_php() | |
39 | { | |
40 | return sprintf("(%s)", $this->data); | |
41 | } | |
42 | } |