Overview

Namespaces

  • None
  • WPGMZA
    • CustomFieldFilterWidget
    • Integration
    • MarkerListing
    • Selector

Classes

  • AddMapDialog
  • AdminMarkerDataTable
  • AjaxTable
  • AutoLoader
  • Categories
  • Category
  • CategoryTree
  • CategoryTreeNode
  • ContentEditorMapButton
  • Crud
  • CustomFieldFilter
  • CustomFieldFilterController
  • CustomFieldFilterWidget
  • CustomFields
  • CustomFieldsPage
  • CustomMapObjectFields
  • CustomMarkerFields
  • Database
  • DataTable
  • Distance
  • DOMDocument
  • DOMElement
  • Export
  • Factory
  • FontAwesomeIconPicker
  • GDPRCompliance
  • GlobalSettings
  • GoogleGeocoder
  • GoogleMap
  • GoogleMapsAPILoader
  • GoogleMapsLoader
  • GoogleProMapsLoader
  • Import
  • ImportCSV
  • ImportGPX
  • ImportJSON
  • ImportKML
  • LatLng
  • Map
  • MapSelect
  • MapsEngineDialog
  • Marker
  • MarkerDataTable
  • MarkerFilter
  • MarkerLibraryDialog
  • MarkerListing
  • ModalDialog
  • NominatimGeocodeCache
  • OLLoader
  • OLProLoader
  • Plugin
  • ProAdminMarkerDataTable
  • ProMap
  • ProMarker
  • ProMarkerFilter
  • ProPlugin
  • ProRestAPI
  • Query
  • QueryFragment
  • RestAPI
  • ScriptLoader
  • Strings
  • Table

Functions

  • add_custom_filter_widgets
  • create_marker_instance_delegate
  • custom_field_filter_get_filtered_marker_ids
  • get_custom_field_filter
  • get_custom_field_filter_controller
  • get_custom_field_filter_widget
  • get_marker_custom_fields
  • import_ajax_delete_schedule
  • import_ajax_file_options
  • import_ajax_handle_delete
  • import_ajax_handle_upload
  • import_ajax_import
  • import_ajax_schedule
  • import_cron_import
  • import_cron_schedules
  • import_export_admin_options
  • import_export_admin_tabs
  • import_export_download
  • import_export_get_maps_list
  • import_get_progress
  • import_get_schedule
  • import_mimes
  • import_wp_check_filetype_and_ext
  • load_advanced_menu_page_hooks
  • query_nominatim_cache
  • show_custom_fields_page
  • store_nominatim_cache
  • Overview
  • Namespace
  • Class

Class Import

Importer for WP Google Maps Pro

This handles importing of files.

Direct known subclasses

WPGMZA\ImportCSV, WPGMZA\ImportGPX, WPGMZA\ImportJSON, WPGMZA\ImportKML
Abstract
Namespace: WPGMZA
Since: 7.0.0
Located at import-export/class.import.php
Methods summary
public
# __construct( string $file = '', string $file_url = '', array $options = array() )

Import constructor.

Import constructor.

Parameters

$file
Optional. Absolute path to file.
$file_url
Optional. URL to file.
$options
Optional. Import options.

Throws

Exception
If unable to load file.
abstract protected
# check_options( )

Sanitize options.

Sanitize options.

protected array
# check_ids( array $ids )

Check ids.

Check ids.

Parameters

$ids
Integer array of ids.

Returns

array
Integer array of ids.

Throws

Exception
On bad id.
protected
# load_file( )

Load file data from file.

Load file data from file.

protected
# attempt_set_time_limit( )
protected
# record_start_time( )
protected
# get_time_limit( )
protected
# get_remaining_time( )
protected
# bail_if_near_time_limit( )
abstract protected
# parse_file( )

Parse file data.

Parse file data.

abstract public string
# admin_options( )

Output admin import options.

Output admin import options.

Returns

string
Options html.
abstract public
# import( )

Import the file.

Import the file.

public
# onImportComplete( )
public
# set_progress( float $value )

Sets the import progress for this session.

Sets the import progress for this session.

Parameters

$value
A number between 0 and 1 representing the progress.
public string
# get_admin_notices( )

Returns HTML for the admin notices.

Returns HTML for the admin notices.

Returns

string
protected string|array|boolean
# geocode( string $location, string $type = 'address' )

Geocode.

Geocode.

Parameters

$location
Either an address or latitude, longitude coordinates.
$type
Optional. 'address' to geocode, 'latlng' to reverse geocode. Default 'address'.

Returns

string|array|boolean
Address or array of latitude and longitude, false on failure or no results.
Properties summary
protected string $file

Absolute path to file.

Absolute path to file.

# ''
protected string $file_url

URL to file.

URL to file.

# ''
protected mixed $file_data

Decoded file data.

Decoded file data.

# null
protected array $options

Import options.

Import options.

# array()
protected array $db_defaults

Database insertion defaults.

Database insertion defaults.

# array()
API documentation generated by ApiGen