public function doTemplateFile($functionName, PHPTAL_Dom_Element $treeGen) { $this->doComment("\n*** DO NOT EDIT THIS FILE ***\n\nGenerated by PHPTAL from " . $treeGen->getSourceFile() . " (edit that file instead)"); $this->doFunction($functionName, 'PHPTAL $tpl, PHPTAL_Context $ctx'); $this->setFunctionPrefix($functionName . "_"); $this->doSetVar('$_thistpl', '$tpl'); $this->doInitTranslator(); $treeGen->generateCode($this); $this->doComment("end"); $this->doEnd('function'); }