Class org_routamc_positioning_importer

Description

Position importing factory class. All importers inherit from this.

Located in /org.routamc.positioning/importer.php (line 15)

PEAR
   |
   --midcom_baseclasses_core_object
      |
      --midcom_baseclasses_components_purecode
         |
         --org_routamc_positioning_importer
Direct descendents
Class Description
 class org_routamc_positioning_importer_manual Importer for manually entered positions
 class org_routamc_positioning_importer_plazes Importer for fetching position data for Plazes users
Variable Summary
 string $error
 org_routamc_positioning_log $log
Method Summary
 org_routamc_positioning_importer org_routamc_positioning_importer ()
 bool import (Array $logs)
 void map_to_city (mixed $log)
 Array normalize_coordinates (mixed $latitude, mixed $longitude)
Variables
string $error = 'MGD_ERR_OK' (line 29)

Error code from trying to import. Either an mgd_errstr() or an additional error code from component

org_routamc_positioning_log $log = null (line 22)

The imported log entries

Inherited Variables

Inherited from midcom_baseclasses_components_purecode

midcom_baseclasses_components_purecode::$_component
midcom_baseclasses_components_purecode::$_component_data
midcom_baseclasses_components_purecode::$_config
midcom_baseclasses_components_purecode::$_i18n
midcom_baseclasses_components_purecode::$_l10n
midcom_baseclasses_components_purecode::$_l10n_midcom
Methods
Constructor org_routamc_positioning_importer (line 34)

Initializes the class. The real startup is done by the initialize() call.

org_routamc_positioning_importer org_routamc_positioning_importer ()
create (line 100)

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

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

On any error (class not found etc.) the factory method will call generate_error.

This function must be called statically.

  • return: A reference to the newly created importer instance.
org_routamc_positioning_importer &create (string $type)
  • string $type: The type of the importer (the file name from the importer directory).
import (line 83)

Empty default implementation, this calls won't do much.

  • return: Indicating success.
bool import (Array $logs)
  • Array $logs: Log entries in Array format specific to importer

Redefined in descendants as:
map_to_city (line 71)

Map locations that are not yet mapped to their nearest city

void map_to_city (mixed $log)
normalize_coordinates (line 45)

Normalize coordinates into decimal values

Array normalize_coordinates (mixed $latitude, mixed $longitude)

Inherited Methods

Inherited From midcom_baseclasses_components_purecode

 midcom_baseclasses_components_purecode::midcom_baseclasses_components_purecode()
 midcom_baseclasses_components_purecode::_bind_to_request_data()
 midcom_baseclasses_components_purecode::_load_topic_configuration()

Inherited From midcom_baseclasses_core_object

 midcom_baseclasses_core_object::midcom_baseclasses_core_object()

Documentation generated on Tue, 15 Aug 2006 12:35:30 +0300 by phpDocumentor 1.3.0RC3