Base CSV Parser
Implements functionality that all CSV Parsers must have. Implementation of the inherited abstract parse method is left to concrete classes.
withHeaders($headers)
withFile($file)
parse($row)
setHeaders(array $headers)
Set the headers to use
array
The headers
getHeaders() : array
Get the current headers in use
array
parseFile(string $file) : array|bool
Reads a CSV file and executes a concrete parse method on each one, returning an array of parsed rows (or false if the file can't be read). The first line is not parsed, as it's considered headers which must be set prior to calling parseFile via setHeaders
string
Path to the CSV file on disc
array|bool
headers
Stores headers in use by this parser