public function __construct($file, $delimiter = ',', $maxRowLength = 4098, $skipRows = 0) { parent::__construct($file, $delimiter, $maxRowLength); while ($skipRows > 0) { parent::next(); $skipRows--; } // Extract the header information $this->colNames = parent::current(); foreach ($this->colNames as $index => $name) { if (isset($this->colIndexes[$name])) { throw new DataFileException("Duplicate column name {$name}!"); } $this->colIndexes[$name] = $index; } parent::next(); }