/** * 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; } }
/** * 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"; }