fileHandle = @fopen($filepath, "r"); if ($this->fileHandle===false) { throw new \Exception('PoParser: Could not open file: "' . htmlspecialchars($filepath) . '"'); } // Guess encoding $wholefile = file_get_contents($filepath, false, null, 0, 1000); $encoding = mb_detect_encoding($wholefile); if ($encoding===false) { } else { $this->encoding = $encoding; } } public function getNextLine() { return fgets($this->fileHandle); } public function ended() { return feof($this->fileHandle); } public function close() { return @fclose($this->fileHandle); } public function save($outputFile) { } }