Position importing factory class.

All importers inherit from this.

package org.routamc.positioning

 Methods

create (string $type)

This is a static factory method which lets you dynamically create importer instances.
Static

It takes care of loading the required class files. The returned instances will be created but not initialized.

Parameters

$type

stringThe type of the importer (the file name from the importer directory).

Returns

\org_routamc_positioning_importerA reference to the newly created importer instance.

import (array $logs, integer $person_id)

Run the actual import

Parameters

$logs

arrayLog entries in Array format specific to importer

$person_id

integerID of the person to import logs for

Returns

booleanIndicating success.

map_to_city ($log)

Map locations that are not yet mapped to their nearest city

Parameters

$log

normalize_coordinates ($latitude, $longitude)

Normalize coordinates into decimal values

Parameters

$latitude

$longitude

Returns

Array

 Properties

 

string $error

Error code from trying to import.

Either a midcom_connection::get_error_string() or an additional error code from component

 

string $error_string

Error string from trying to import.

Either a midcom_connection::get_error_string() or an additional error code from component

 

\org_routamc_positioning_log $log

The imported log entries