CSVImportLocations
extends CSVImport
in package
CSV Import of Locations
Tags
Table of Contents
Properties
- $action_params : mixed
- $addon : SLPPro
- $addon : mixed
- $file_meta : _FILES
- $file_meta : mixed
- $reported_too_many_fields : bool
- $settings : SLP_Settings
- $skip_geocoding : bool
- $action_params : mixed
- $reported_too_many_fields : mixed
- $settings : mixed
- $skip_geocoding : mixed
Methods
- action_ProcessCSVFile() : mixed
- Process the lines of the CSV file.
- createstring_CronMessages() : mixed
- Create cron messages box.
- createstring_CronSchedule() : string
- Get the cron schedule as a formatted HTML string.
- file_has_address_fields() : mixed
- Check that the location file has the address fields.
- filter_SetDefaultFieldNames() : array<string|int, string>
- Set the default field names if the CSV Import header is not provided.
- filter_SetMessages() : array<string|int, mixed>
- Set the process count output strings the users sees after an upload.
- initialize() : mixed
- Setup a standard CSV Import object and attach the processing method and data filters.
- load_directly_into_mysql() : mixed
- Load basic CSV files directly into MYSQL with LOAD DATA.
- ok_to_process_file() : bool
- Return true if it is OK to process this file.
- prepare_for_import() : mixed
- Things we do to prepare for an import.
- process_File() : mixed
- Process the file being imported.
- return_base_fields_only() : bool
- Only use the base table fields.
- save_import_message_stack() : mixed
- Save the import message stack to persistent storage.
- strip_extra_spaces_from_csv_location_data() : array<string|int, string>
- Strip extra spaces from location data.
- set_FileMeta() : mixed
- Set file meta for the import.
Properties
$action_params read-only
public
mixed
$action_params
The params received during the cron job call.
$addon
public
SLPPro
$addon
This addon pack.
$addon
public
mixed
$addon
$file_meta
public
_FILES
$file_meta
$file_meta
public
mixed
$file_meta
$reported_too_many_fields read-only
public
bool
$reported_too_many_fields
Did we already report a too many fields problem?
$settings read-only
public
SLP_Settings
$settings
The manage locations settings interface object.
$skip_geocoding read-only
public
bool
$skip_geocoding
Should goecoding be skipped?
$action_params
private
mixed
$action_params
$reported_too_many_fields
private
mixed
$reported_too_many_fields
= \false
$settings
private
mixed
$settings
$skip_geocoding
private
mixed
$skip_geocoding
= \false
Methods
action_ProcessCSVFile()
Process the lines of the CSV file.
public
action_ProcessCSVFile() : mixed
createstring_CronMessages()
Create cron messages box.
public
createstring_CronMessages() : mixed
createstring_CronSchedule()
Get the cron schedule as a formatted HTML string.
public
createstring_CronSchedule() : string
Return values
stringfile_has_address_fields()
Check that the location file has the address fields.
public
file_has_address_fields() : mixed
filter_SetDefaultFieldNames()
Set the default field names if the CSV Import header is not provided.
public
filter_SetDefaultFieldNames(array<string|int, string> $name_array) : array<string|int, string>
Default: 'sl_store' [ 0],'sl_address' [ 1],'sl_address2'[ 2],'sl_city' [ 3],'sl_state'[ 4], 'sl_zip' [ 5],'sl_country' [ 6],'sl_tags' [ 7],'sl_description'[ 8],'sl_url' [ 9], 'sl_hours' [10],'sl_phone' [11],'sl_email' [12],'sl_image' [13],'sl_fax' [14], 'sl_latitude'[15],'sl_longitude'[16],'sl_private' [17],'sl_neat_title' [18]
Parameters
- $name_array : array<string|int, string>
Return values
array<string|int, string>filter_SetMessages()
Set the process count output strings the users sees after an upload.
public
filter_SetMessages(array<string|int, string> $message_array) : array<string|int, mixed>
Parameters
- $message_array : array<string|int, string>
Return values
array<string|int, mixed>initialize()
Setup a standard CSV Import object and attach the processing method and data filters.
public
initialize() : mixed
load_directly_into_mysql()
Load basic CSV files directly into MYSQL with LOAD DATA.
public
load_directly_into_mysql() : mixed
This is MUCH faster than CSV parsing but requires the CSV has no extended data such as Tagalong categories, etc.
ok_to_process_file()
Return true if it is OK to process this file.
public
ok_to_process_file() : bool
Return values
boolprepare_for_import()
Things we do to prepare for an import.
public
prepare_for_import() : mixed
process_File()
Process the file being imported.
public
process_File([array<string|int, mixed> $file_meta = null ][, mixed $mode = null ]) : mixed
cron_csv_import action takes 2 parameters: param 1: the action to perform param 2: the params to be sent to the action processor
Parameters
- $file_meta : array<string|int, mixed> = null
-
the details about the file being processed.
- $mode : mixed = null
return_base_fields_only()
Only use the base table fields.
public
return_base_fields_only( $var) : bool
Parameters
Return values
boolsave_import_message_stack()
Save the import message stack to persistent storage.
public
save_import_message_stack() : mixed
strip_extra_spaces_from_csv_location_data()
Strip extra spaces from location data.
public
strip_extra_spaces_from_csv_location_data( $location_data) : array<string|int, string>
Parameters
Return values
array<string|int, string> —$location_data
set_FileMeta()
Set file meta for the import.
private
set_FileMeta() : mixed
Use the standard browser file upload objects $_FILES if set.
If not set check for a remote file URL and use that.