You are here

public function CsvParser::getHeader in Feeds 8.3

Returns the header row.

Return value

array A list of the header names.

File

src/Component/CsvParser.php, line 160

Class

CsvParser
Parses an RFC 4180 style CSV file.

Namespace

Drupal\feeds\Component

Code

public function getHeader() {
  $prev = ftell($this->handle);
  rewind($this->handle);
  $header = $this
    ->parseLine($this
    ->readLine());
  fseek($this->handle, $prev);
  return $header;
}