/** * write current output buffer to file * * @param file path * @param formating flags * @access private */ function write() { $stat = true; if ($this->path) { $text = ob_get_clean(); $fp = new CodeGen_Tools_FileReplacer($this->path); if ($this->flags && self::OB_TABIFY) { $text = CodeGen_Tools_Indent::tabify($text); } else { if ($this->flags && self::OB_UNTABIFY) { $text = CodeGen_Tools_Indent::untabify($text); } } if ($this->flags && self::OB_DOSIFY) { $text = CodeGen_Tools_Indent::tabify($text); } $fp->puts($text); $stat = $fp->close(); $this->path = ""; } return $stat; }