4 class Haanga_Extension_Tag_Exec
6 public $is_block = FALSE;
8 function generator($cmp, $args, $assign=NULL)
10 if (!$cmp->isExecAllowed()) {
11 throw new Haanga_Compiler_Exception("Tag exec is disabled for security reasons");
16 if (Haanga_AST
::is_var($args[0])) {
17 $args[0] = $args[0]['var'];
18 } else if (Haanga_AST
::is_str($args[0])) {
19 $args[0] = $args[0]['string'];
21 throw new Haanga_Compiler_Exception("invalid param");
24 $exec = hexec($args[0]);
25 for ($i=1; $i < count($args); $i++
) {
26 $exec->param($args[$i]);
30 $code->decl($assign, $exec);
32 $cmp->do_print($code, $exec);