You are here

public function ParserCSV::setTimeout in Feeds 6

Same name and namespace in other branches
  1. 7.2 libraries/ParserCSV.inc \ParserCSV::setTimeout()
  2. 7 libraries/ParserCSV.inc \ParserCSV::setTimeout()

Define the time (in milliseconds) after which the parser stops parsing, even if it has not yet finished processing the CSV data. If the timeout has been reached before parsing is done, the parse() method will return an incomplete list of rows - a single row will never be cut off in the middle, though. By default, no timeout (@p $timeout == FALSE) is defined.

You can check if the timeout has been reached by calling the timeoutReached() method after parse() has been called.

File

libraries/ParserCSV.inc, line 125

Class

ParserCSV
Functionality to parse CSV files into a two dimensional array.

Code

public function setTimeout($timeout) {
  $this->timeout = $timeout;
}