public function flush() { // Make sure we have the file header. $this->_beginDoc(); $buffer = $this->_buffer; $this->_buffer = ''; $this->_flushed = true; $this->_buflen += strlen($buffer); return $buffer; }