folderKey; } public function getLastError() { return $this->lastErr; } protected function open($filename) { mb_internal_encoding('UTF-8'); $this->file = fopen($filename, "r"); if (!fgetcsv($this->file)) { $this->lastErr = "Unable to read CSV file"; return false; } return true; } protected function close() { fclose($this->file); $this->file = null; } }