|
const | DEFAULT_DIRECTORY = GALETTE_EXPORTS_PATH |
|
const | NEWLINE = "\r\n" |
|
const | BUFLINES = 100 |
|
const | DEFAULT_SEPARATOR = ';' |
|
const | DEFAULT_QUOTE = '"' |
|
const | FILE_NOT_WRITABLE = -1 |
|
const | DB_ERROR = -2 |
|
|
string | $separator |
|
string | $quote |
|
string | $escaped |
|
mixed | $file |
|
string | $result |
|
int | $current_line |
|
array | $extensions = array('csv') |
|
array | $accepted_separators |
|
array | $accepted_quotes |
|
CSV exports
- Author
- Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be
◆ __construct()
Galette\IO\CsvOut::__construct |
( |
| ) |
|
◆ export()
Galette\IO\CsvOut::export |
( |
ResultSet|array |
$rs, |
|
|
string |
$separator, |
|
|
string |
$quote, |
|
|
array|bool |
$titles = false , |
|
|
mixed |
$file = false |
|
) |
| |
Export Array result set to CSV
- Parameters
-
| ResultSet|array<int,mixed> | $rs Results as an array |
string | $separator | The CSV separator (either '\t', ';' or ',' are accepted) |
string | $quote | how does fields should be quoted |
| array<string>|bool | $titles does export shows column titles or not. Defaults to false. |
resource | false | $file | export to a file on disk. A file pointer should be passed here. Defaults to false. |
- Returns
- string CSV result
◆ getParamedtedExportName()
Galette\IO\CsvOut::getParamedtedExportName |
( |
string |
$id | ) |
|
Retrieve parameted export name
- Parameters
-
string | $id | Parameted export identifier |
- Returns
- ?string
◆ getParametedExports()
Galette\IO\CsvOut::getParametedExports |
( |
| ) |
|
Get al list of all parameted exports
- Returns
- array<string, mixed>
◆ runParametedExport()
Galette\IO\CsvOut::runParametedExport |
( |
string |
$id | ) |
|
Run selected export
- Parameters
-
string | $id | export's id to run |
- Returns
- ?string filename used
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/galette-apidoc/checkouts/develop/galette/lib/Galette/IO/CsvOut.php