class ImportCsv extends AbstractImportCsv

Handles the import for the CSV format

Properties

protected ImportPluginProperties $properties ImportPluginProperties object containing the import plugin properties from ImportPlugin
protected Import $import from ImportPlugin

Methods

__construct()

Constructor

void
doImport(array $sql_data = [])

Handles the whole import logic

getProperties()

Gets the import specific format plugin properties

void
setProperties()

Sets the import plugin properties.

array
getDbnameAndOptions(string $currentDb, string $defaultDb)

Define DB name and options

string
readCsvTerminatedString(string $buffer, string $ch, int $i, int $csv_terminated_len)

Read the expected column_separated_with String of length $csv_terminated_len from the $buffer into variable $ch and return the read string $ch

Details

at line 38
__construct()

Constructor

at line 136
void doImport(array $sql_data = [])

Handles the whole import logic

Parameters

array $sql_data 2-element array with sql data

Return Value

void

in ImportPlugin at line 59
ImportPluginProperties getProperties()

Gets the import specific format plugin properties

Return Value

ImportPluginProperties

at line 50
protected void setProperties()

Sets the import plugin properties.

Called in the constructor.

Return Value

void

in ImportPlugin at line 80
protected array getDbnameAndOptions(string $currentDb, string $defaultDb)

Define DB name and options

Parameters

string $currentDb DB
string $defaultDb Default DB name

Return Value

array DB name and options (an associative array of options)

at line 784
string readCsvTerminatedString(string $buffer, string $ch, int $i, int $csv_terminated_len)

Read the expected column_separated_with String of length $csv_terminated_len from the $buffer into variable $ch and return the read string $ch

Parameters

string $buffer The original string buffer read from csv file
string $ch Partially read "column Separated with" string, also used to return after reading length equal $csv_terminated_len
int $i Current read counter of buffer string
int $csv_terminated_len The length of "column separated with" String

Return Value

string