You are here

public function CsvParser::__construct in Feeds 8.3

Constructs a CsvParser object.

Parameters

resource $handle: An open file handle.

File

src/Component/CsvParser.php, line 67

Class

CsvParser
Parses an RFC 4180 style CSV file.

Namespace

Drupal\feeds\Component

Code

public function __construct($handle) {
  if (!is_resource($handle)) {
    throw new \InvalidArgumentException('$handle must be a resource.');
  }
  $this->handle = $handle;
}