예제 #1
0
 /**
  * Internal function called to  call the accept function and change the given node.
  *
  * @param ezcTemplateAstNode $node  Notice that the parameter will be changed.
  * @return void
  */
 protected function acceptAndUpdate(ezcTemplateAstNode &$node)
 {
     $ret = $node->accept($this);
     if ($ret !== null) {
         $node = $ret;
     }
 }
예제 #2
0
 /**
  * Convenience function for outputting a node.
  * Instantiates the ezcTemplateAstTreeOutput class and calls accept() on
  * $node, the resulting text is returned.
  *
  * @param ezcTemplateAstNode $node
  * @return string
  */
 public static function output(ezcTemplateAstNode $node)
 {
     $treeOutput = new ezcTemplateAstTreeOutput();
     $node->accept($treeOutput);
     return $treeOutput->text . "\n";
 }