public function next()
{
$line = fgetcsv($this->file, 0, $this->delimiter, $this->enclosure, $this->escape);
$this->currentLine = $line;
++$this->position;
if ($this->hasHeaders && is_array($line)) {
$data = array();
foreach ($line as $key => $value) {
$data[$this->columns[$key]] = $value;
}
$this->currentLine = $data;
}
}