public function finishWrite() { // Close the writer try { $this->writer->close(); } catch (Exception $e) { throw new MWException($e->getMessage()); } $this->writer = null; unset($this->readers[$this->currentLang]); $this->currentLang = null; }