4 class Haanga_Extension_Tag_Exec
6 public $is_block = FALSE;
8 static function generator($cmp, $args, $assign=NULL)
10 if (!$cmp->getOption('allow_exec')) {
11 $cmp->Error("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 $cmp->Error("invalid param");
24 // fix for static calls {{{
25 if (is_array($args[0])) {
27 if (isset($end['class'])) {
28 $args[0][ key($args[0]) ]['class'] = substr($end['class'], 1);
33 $exec = hexec($args[0]);
34 for ($i=1; $i < count($args); $i++
) {
35 $exec->param($args[$i]);
39 $code->decl($assign, $exec);
41 $cmp->do_print($code, $exec);