ImportInterface
in
Imports data from a specific format into an array
Tags
Table of Contents
Methods
- parseFile() : void
- Returns the content of a file
Methods
parseFile()
Returns the content of a file
public
parseFile(Cx $cx, File $file, callable $callback[, int $limit = -1 ][, int $offset = -1 ][, array<string|int, mixed> $options = array() ]) : void
$callback will be called for each entry found in the file. It will receive the data fields of the entry as an array as a first argument, if possible it will be indexed by the key of the field.
$options might change behavior and return format slightly.
Parameters
- $cx : Cx
- $file : File
-
File instance to read data from
- $callback : callable
-
Will be called for each row
- $limit : int = -1
-
(optional) Limit the number of rows returned.
- $offset : int = -1
-
(optional) Offset as of which entry limit is counted.
- $options : array<string|int, mixed> = array()
-
(optional) Additional options specific to this importer