public function getIterator()
    {
        $csv = fopen($this->getConfig('file'), 'r');
        if ($csv === false) {
            throw new \RuntimeException('Unable to open file: ' . $this->getConfig('file'));
        }
        while (true) {
            $fields = fgetcsv(
                $csv,
                0,
                $this->getConfig('delimiter'),
                $this->getConfig('quote'),
                $this->getConfig('escape')
            );
            if ($fields === false) {
                break;
            }
            ++$this->line;
            if ($this->columns === null && $this->getConfig('header') === true) {
                $this->columns = array_map(function ($field) { return trim($field); }, $fields);
                if (count($this->columns) !== count(array_unique($this->columns))) {
                    throw new \RuntimeException(
                        'File does not have unique column headers: ' . $this->getConfig('file')
                    );
                }
            } else {
                $row = $this->getConfig('header') === true ? $this->map($fields) : $fields;
                yield empty($this->getConfig('callbacks')) === true ? $row : $this->callback($row);
            }
        }
        fclose($csv);
    }