src/Reader.php
/**
     * Returns all Records between the given start line and the given endline
     * @param int $rowIndexStart - start row index
     * @param int $rowIndexStop - end row index
     * @return array
     * @throws CsvException - if an error occurred while reading
     */
Returns all Records between the given start line and the given endline
@param int $rowIndexStart - start row index
@param int $rowIndexStop - end row index
@return array
@throws CsvException - if an error occurred while reading
Returns all Records between the given start line and the given endline @param int $rowIndexStart - start row index @param int $rowIndexStop - end row index @return array @throws CsvException - if an error occurred while reading
public function readRecordsOfRange(int $rowIndexStart, int $rowIndexStop): array
    {
        if (0 > $rowIndexStart) {
            throw new OutOfRangeException('$rowIndexStart must be a non negativ Integer.');
        }
        if (0 > ($rowCount = $this->getRecordCount())) {
            throw new \InvalidArgumentException('File does not contain any records.');
        }
        if ($rowCount < $rowIndexStop) {
            throw new OutOfRangeException(
                '$rowIndexStop is greater than the row count. File contains ' . $rowCount . ' records.'
            );
        }
        $records = [];
        $this->headerRead();
        $this->setRecordPointerToIndex($rowIndexStart);
        while (null !== ($record = $this->readRecord())) {
            $records[] = $record;
            if ($this->key() === $rowIndexStop) {
                break;
            }
        }
        return $records;
    }
public function readRecordsOfRange ( int $ rowIndexStart , int $ rowIndexStop ) : array { if ( 0 > $ rowIndexStart ) { throw new OutOfRangeException ( '$rowIndexStart must be a non negativ Integer.' ) ; } if ( 0 > ( $ rowCount = $ this -> getRecordCount ( ) ) ) { throw new \ InvalidArgumentException ( 'File does not contain any records.' ) ; } if ( $ rowCount < $ rowIndexStop ) { throw new OutOfRangeException ( '$rowIndexStop is greater than the row count. File contains ' . $ rowCount . ' records.' ) ; } $ records = [ ] ; $ this -> headerRead ( ) ; $ this -> setRecordPointerToIndex ( $ rowIndexStart ) ; while ( null !== ( $ record = $ this -> readRecord ( ) ) ) { $ records [ ] = $ record ; if ( $ this -> key ( ) === $ rowIndexStop ) { break ; } } return $ records ; }
Returns all Records between the given start line and the given endline
 @param int $rowIndexStart - start row index
 @param int $rowIndexStop - end row index
 @return array
 @throws CsvException - if an error occurred while reading
Returns all Records between the given start line and the given endline @param int $rowIndexStart - start row index @param int $rowIndexStop - end row index @return array @throws CsvException - if an error occurred while reading
// First Read Header because it used a rewind() // Set the record pointer to the start index