private function initEmptyBuffer() { if (isset($this->buffer)) { fclose($this->buffer); } $this->buffer = fopen("php://temp", "w+"); $this->bufferEmpty = true; $this->bufferFresh = true; }