+ Moved variables resolution in the compiler Parser. (Temp. solution until the new...
[haanga.git] / lib / Haanga / Extension / Tag / Buffer.php
blobe89817cc2fe0b4c50d359cc0ae11c27b0bbb9343
1 <?php
3 class Haanga_Extension_Tag_Buffer
5 public $is_block = TRUE;
7 static function generator($cmp, $args, $redirected)
9 if (count($args) != 2) {
10 $cmp->Error("buffer filter must have one parameter");
13 /* get new code object */
14 $code = hcode();
15 /* redirect buffer to $args[1] */
16 $code->decl($args[1], $args[0]);
17 /* telling to Haanga that we're handling the output */
18 $code->doesPrint = TRUE;
20 /* $args[1] is already safe (it might have HTML) */
21 $cmp->set_safe($args[1]['var']);
23 return $code;