dolibarr 21.0.0-beta
|
Parent class for import file readers. More...
Public Member Functions | |
__construct () | |
Constructor. | |
getDriverId () | |
getDriverId | |
getDriverLabel () | |
getDriverLabel | |
getDriverDesc () | |
getDriverDesc | |
getDriverExtension () | |
getDriverExtension | |
getDriverVersion () | |
getDriverVersion | |
getLibLabel () | |
getDriverLabel | |
getLibVersion () | |
getLibVersion | |
listOfAvailableImportFormat ($db, $maxfilenamelength=0) | |
Load into memory list of available import format. | |
getPictoForKey ($key) | |
Return picto of import driver. | |
getDriverLabelForKey ($key) | |
Return label of driver import. | |
getDriverDescForKey ($key) | |
Return description of import drivervoi la description d'un driver import. | |
getDriverVersionForKey ($key) | |
Renvoi version d'un driver import. | |
getLibLabelForKey ($key) | |
Renvoi libelle de librairie externe du driver. | |
getLibVersionForKey ($key) | |
Renvoi version de librairie externe du driver. | |
getElementFromTableWithPrefix ($tableNameWithPrefix) | |
Get element from table name with prefix. | |
import_open_file ($file) | |
Open input file. | |
import_get_nb_of_lines ($file) | |
Return nb of records. | |
import_read_header () | |
Input header line from file. | |
import_read_record () | |
Return array of next record in input file. | |
import_close_file () | |
Close file handle. | |
import_insert ($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys) | |
Insert a record into database. | |
Parent class for import file readers.
Definition at line 33 of file modules_import.php.
ModeleImports::getDriverDesc | ( | ) |
ModeleImports::getDriverDescForKey | ( | $key | ) |
Return description of import drivervoi la description d'un driver import.
string | $key | Key |
Definition at line 330 of file modules_import.php.
ModeleImports::getDriverExtension | ( | ) |
ModeleImports::getDriverId | ( | ) |
ModeleImports::getDriverLabel | ( | ) |
ModeleImports::getDriverLabelForKey | ( | $key | ) |
Return label of driver import.
string | $key | Key |
Definition at line 319 of file modules_import.php.
ModeleImports::getDriverVersion | ( | ) |
ModeleImports::getDriverVersionForKey | ( | $key | ) |
Renvoi version d'un driver import.
string | $key | Key |
Definition at line 341 of file modules_import.php.
ModeleImports::getElementFromTableWithPrefix | ( | $tableNameWithPrefix | ) |
Get element from table name with prefix.
string | $tableNameWithPrefix | Table name with prefix |
Definition at line 374 of file modules_import.php.
Referenced by ImportCsv\import_insert(), and ImportXlsx\import_insert().
ModeleImports::getLibLabel | ( | ) |
getDriverLabel
Definition at line 239 of file modules_import.php.
ModeleImports::getLibLabelForKey | ( | $key | ) |
Renvoi libelle de librairie externe du driver.
string | $key | Key |
Definition at line 352 of file modules_import.php.
ModeleImports::getLibVersion | ( | ) |
getLibVersion
Definition at line 249 of file modules_import.php.
ModeleImports::getLibVersionForKey | ( | $key | ) |
Renvoi version de librairie externe du driver.
string | $key | Key |
Definition at line 363 of file modules_import.php.
ModeleImports::getPictoForKey | ( | $key | ) |
Return picto of import driver.
string | $key | Key |
Definition at line 308 of file modules_import.php.
ModeleImports::import_close_file | ( | ) |
Close file handle.
Reimplemented in ImportCsv, and ImportXlsx.
Definition at line 461 of file modules_import.php.
References dol_syslog().
ModeleImports::import_get_nb_of_lines | ( | $file | ) |
Return nb of records.
File must be closed.
string | $file | Path of filename |
Reimplemented in ImportCsv, and ImportXlsx.
Definition at line 411 of file modules_import.php.
References dol_syslog().
ModeleImports::import_insert | ( | $arrayrecord, | |
$array_match_file_to_database, | |||
$objimport, | |||
$maxfields, | |||
$importid, | |||
$updatekeys ) |
Insert a record into database.
array<string,array{val:mixed,type:int<-1,1>}>|boolean | $arrayrecord Array of read values: [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=string), [fieldpos+1]... | |
array<int|string,string> | $array_match_file_to_database Array of target fields where to insert data: [fieldpos] => 's.fieldname', [fieldpos+1]... | |
Object | $objimport | Object import (contains objimport->array_import_tables, objimport->array_import_fields, objimport->array_import_convertvalue, ...) |
int | $maxfields | Max number of fields to use |
string | $importid | Import key |
string[] | $updatekeys | Array of keys to use to try to do an update first before insert. This field are defined into the module descriptor. |
Reimplemented in ImportCsv, and ImportXlsx.
Definition at line 484 of file modules_import.php.
References dol_syslog().
ModeleImports::import_open_file | ( | $file | ) |
Open input file.
string | $file | Path of filename |
Reimplemented in ImportCsv, and ImportXlsx.
Definition at line 393 of file modules_import.php.
References dol_syslog().
ModeleImports::import_read_header | ( | ) |
Input header line from file.
Reimplemented in ImportCsv, and ImportXlsx.
Definition at line 427 of file modules_import.php.
References dol_syslog().
ModeleImports::import_read_record | ( | ) |
Return array of next record in input file.
Reimplemented in ImportCsv, and ImportXlsx.
Definition at line 444 of file modules_import.php.
References dol_syslog().
ModeleImports::listOfAvailableImportFormat | ( | $db, | |
$maxfilenamelength = 0 ) |
Load into memory list of available import format.
Definition at line 262 of file modules_import.php.
References dol_syslog().