public function getIterator()
    {
        if (!file_exists($this->filepath)) {
            //TODO: throw exception instead?
            return null;
        }
        $header = $this->hasheader ? $this->getFirstRow() : null;
        $output = array();

        $config = new LexerConfig();
        $config->setDelimiter($this->delimiter);
        $config->setEnclosure($this->enclosure);
        $config->setIgnoreHeaderLine($this->hasheader);

        $interpreter = new Interpreter();
        // Ignore row column count consistency
        $interpreter->unstrict();
        $interpreter->addObserver(function (array $row) use (&$output, $header) {
            if ($header) {
                //create new row using headings as keys
                $newrow = array();
                foreach ($header as $k => $heading) {
                    if (isset($row[$k])) {
                        $newrow[$heading] = $row[$k];
                    }
                }
                $row = $newrow;
            }
            $output[] = $row;
        });

        $lexer = new Lexer($config);
        $lexer->parse($this->filepath, $interpreter);

        return new ArrayIterator($output);
    }