QubitFlatfileExport
in package
Table of Contents
Methods
- __construct() : mixed
- addRow() : mixed
- Add a row to the export buffer.
- close() : mixed
- Close the output file.
- getColumnNames() : array<string|int, mixed>
- Get column names.
- getColumns() : array<string|int, mixed>
- Get column definitions.
- getOption() : mixed
- Get an option value.
- getResource() : object|null
- Get the current resource.
- getRows() : array<string|int, mixed>
- Get all buffered rows.
- loadResourceSpecificConfiguration() : static
- Load column configuration from YAML.
- open() : bool
- Open the output file.
- setColumnNames() : mixed
- Set column names (header row).
- setColumns() : mixed
- Set column definitions.
- setOption() : mixed
- Set an option value.
- setResource() : mixed
- Set the current resource for export.
- writeHeaderRow() : mixed
- Write the header row.
- writeRow() : mixed
- Write a data row.
Methods
__construct()
public
__construct([string $filePath = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $filePath : string = null
-
Output CSV file path
- $options : array<string|int, mixed> = []
addRow()
Add a row to the export buffer.
public
addRow(array<string|int, mixed> $row) : mixed
Parameters
- $row : array<string|int, mixed>
close()
Close the output file.
public
close() : mixed
getColumnNames()
Get column names.
public
getColumnNames() : array<string|int, mixed>
Return values
array<string|int, mixed>getColumns()
Get column definitions.
public
getColumns() : array<string|int, mixed>
Return values
array<string|int, mixed>getOption()
Get an option value.
public
getOption(string $name[, mixed $default = null ]) : mixed
Parameters
- $name : string
- $default : mixed = null
getResource()
Get the current resource.
public
getResource() : object|null
Return values
object|nullgetRows()
Get all buffered rows.
public
getRows() : array<string|int, mixed>
Return values
array<string|int, mixed>loadResourceSpecificConfiguration()
Load column configuration from YAML.
public
loadResourceSpecificConfiguration(string $configFile) : static
Parameters
- $configFile : string
-
Path to YAML config
Return values
staticopen()
Open the output file.
public
open() : bool
Return values
boolsetColumnNames()
Set column names (header row).
public
setColumnNames(array<string|int, mixed> $names) : mixed
Parameters
- $names : array<string|int, mixed>
setColumns()
Set column definitions.
public
setColumns(array<string|int, mixed> $columns) : mixed
Parameters
- $columns : array<string|int, mixed>
setOption()
Set an option value.
public
setOption(string $name, mixed $value) : mixed
Parameters
- $name : string
- $value : mixed
setResource()
Set the current resource for export.
public
setResource(object $resource) : mixed
Parameters
- $resource : object
writeHeaderRow()
Write the header row.
public
writeHeaderRow() : mixed
writeRow()
Write a data row.
public
writeRow(array<string|int, mixed> $row) : mixed
Parameters
- $row : array<string|int, mixed>