public function finishWrite() { if (!$this->writing) { $this->closeWrite(); } $this->finishWrite = true; return true; }