|
const | DEFAULT_DIRECTORY = GALETTE_IMPORTS_PATH |
|
const | DATA_IMPORT_ERROR = -10 |
|
const | NEWLINE = "\r\n" |
|
const | BUFLINES = 100 |
|
const | DEFAULT_SEPARATOR = ';' |
|
const | DEFAULT_QUOTE = '"' |
|
const | FILE_NOT_WRITABLE = -1 |
|
const | DB_ERROR = -2 |
|
const | INVALID_FILENAME = -1 |
|
const | INVALID_EXTENSION = -2 |
|
const | FILE_TOO_BIG = -3 |
|
const | IMAGE_TOO_SMALL = -4 |
|
const | MIME_NOT_ALLOWED = -5 |
|
const | NEW_FILE_EXISTS = -6 |
|
const | INVALID_FILE = -7 |
|
const | CANT_WRITE = -8 |
|
const | MAX_FILE_SIZE = 2048 |
|
const | MIN_CROP_SIZE = 267 |
|
|
array | $extensions = array('csv', 'txt') |
|
string | $separator |
|
string | $quote |
|
string | $escaped |
|
mixed | $file |
|
string | $result |
|
int | $current_line |
|
array | $extensions = array('csv') |
|
array | $accepted_separators |
|
array | $accepted_quotes |
|
CSV imports
- Author
- Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be
◆ __construct()
Galette\IO\CsvIn::__construct |
( |
Db |
$zdb | ) |
|
Default constructor
- Parameters
-
◆ getDefaultFields()
Galette\IO\CsvIn::getDefaultFields |
( |
| ) |
|
Get default fields
- Returns
- array<string>
◆ getErrorMessage()
Galette\IO\CsvIn::getErrorMessage |
( |
int |
$code | ) |
|
Return textual error message
- Parameters
-
- Returns
- string Localized message
◆ import()
Galette\IO\CsvIn::import |
( |
Db |
$zdb, |
|
|
Preferences |
$preferences, |
|
|
History |
$history, |
|
|
string |
$filename, |
|
|
array |
$members_fields, |
|
|
array |
$members_fields_cats, |
|
|
bool |
$dryrun |
|
) |
| |
Import members from CSV file
- Parameters
-
Db | $zdb | Database instance |
Preferences | $preferences | Preferences instance |
History | $history | History instance |
string | $filename | CSV filename |
| array<string,mixed> | $members_fields Members fields |
| array<string,mixed> | $members_fields_cats Members fields categories |
boolean | $dryrun | Run in dry run mode (do not store in database) |
- Returns
- bool|int
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/CsvIn.php