Esempio n. 1
0
 /**
  * Standard function close tag parser
  *
  * @param Tokenizer $tokens
  * @param Tag $tag
  * @return string
  */
 public static function stdFuncClose($tokens, Tag $tag)
 {
     $tag->restore(\Fenom::AUTO_ESCAPE);
     if (is_string($tag->callback)) {
         return $tag->out($tag->callback . "(" . $tag["params"] . ', ob_get_clean(), $tpl, $var)');
     } else {
         return '$info = $tpl->getStorage()->getTag(' . var_export($tag->name, true) . ');' . PHP_EOL . $tag->out('call_user_func_array($info["function"], array(' . $tag["params"] . ', ob_get_clean(), $tpl, &$var))');
     }
 }