Exemplo n.º 1
0
 /**
  * @return Iterator
  */
 public function buildIterator()
 {
     if (!$this->exists()) {
         throw new RuntimeException("The file {$this->pathToFile} does not exist");
     }
     $iterator = new Iterator($this->pathToFile, $this->fieldDelimiter, $this->fieldEnclosure);
     if ($this->columnNames) {
         $iterator->setColumnNames($this->columnNames);
     }
     return $iterator;
 }