@@ -23,12 +23,26 @@ Underlying method is [fgetcsv](https://secure.php.net/manual/en/function.fgetcsv
2323Options
2424-------
2525
26- | Code | Type | Required | Default | Description |
27- | ---- | ---- | :------: | ------- | ----------- |
28- | ` file_path ` | ` string ` | ** X** | | Path of the file to read from (relative to symfony root or absolute) |
29- | ` delimiter ` | ` string ` | | ` ; ` | CSV delimiter |
30- | ` enclosure ` | ` string ` | | ` " ` | CSV enclosure character |
31- | ` escape ` | ` string ` | | ` \\ ` | CSV escape character |
32- | ` headers ` | ` array ` or ` null ` | | ` null ` | Static list of CSV headers, without the option, it will be dynamically read from first input |
33- | ` mode ` | ` string ` | | ` rb ` | File open mode (see [ fopen mode parameter] ( https://secure.php.net/manual/en/function.fopen.php ) ) |
34- | ` log_empty_lines ` | ` bool ` | | ` false ` | Log when the output is empty |
26+ | Code | Type | Required | Default | Description |
27+ | -------------------| -------------------| :---------:| ----------| --------------------------------------------------------------------------------------------------|
28+ | ` file_path ` | ` string ` | ** X** | | Path of the file to read from (relative to symfony root or absolute) |
29+ | ` delimiter ` | ` string ` | | ` ; ` | CSV delimiter |
30+ | ` enclosure ` | ` string ` | | ` " ` | CSV enclosure character |
31+ | ` escape ` | ` string ` | | ` \\ ` | CSV escape character |
32+ | ` headers ` | ` array ` or ` null ` | | ` null ` | Static list of CSV headers, without the option, it will be dynamically read from first input |
33+ | ` mode ` | ` string ` | | ` rb ` | File open mode (see [ fopen mode parameter] ( https://secure.php.net/manual/en/function.fopen.php ) ) |
34+ | ` log_empty_lines ` | ` bool ` | | ` false ` | Log when the output is empty |
35+
36+ Example
37+ -------
38+
39+ ``` yaml
40+ # Task configuration level
41+ code :
42+ service : ' @CleverAge\ProcessBundle\Task\File\Csv\CsvReaderTask'
43+ options :
44+ file_path : ' path/to/file.csv'
45+ delimiter : ' {{ delimiter }}' # # delimiter is contextualized you must add -c delimiter:";" on console execute
46+ ` ` `
47+
48+
0 commit comments