Public Member Functions | |
| __construct ($inDBObject) | |
Static Public Member Functions | |
| static | listener_action ( $inItem) |
Static Public Attributes | |
| static | $db_object |
Static Private Member Functions | |
| static | _extract_entity ($tzid, $coords_array) |
| static | _process_entity ($inEntity) |
| static | _update_coords ( $current, $next) |
This class is a mainly static class that will process the main data file, and initialize the database.
It extends the streamer's GeoJSON listener class.
It will not require any constructor data, and will set itself up.
Definition at line 54 of file LGV_TZ_Lookup_Loader.class.php.
| LGV_TZ_Lookup_Loader::__construct | ( | $inDBObject | ) |
The constructor.
| $inDBObject | An initialized database instance for this handler. |
Definition at line 66 of file LGV_TZ_Lookup_Loader.class.php.
|
staticprivate |
This function generates a new entity, based on the given time zone ID, and the polygon array.
| $tzid | This is the standard TZ time zone designator that applies to this entity. |
| $coords_array | This is the exact polygon for this entitye. |
Definition at line 125 of file LGV_TZ_Lookup_Loader.class.php.
|
staticprivate |
This processes one new entity, after we have parsed it.
| $inEntity | The new entity to be processed. |
Definition at line 96 of file LGV_TZ_Lookup_Loader.class.php.
Referenced by listener_action().
|
staticprivate |
This function simply compares the given long ([0], and lat ([1]) against the current values, and extends an edge, if necessary.
This is designed to be a reduce handler, with the current value, and the new value, passed in, returning a new current value.
| $current | This is the current domain rect. It contains the maximums for East, West, North, and South, in an associative array. |
| $next | This is the next value of the long lat. It is a simple 2-element floating point array, with [0] being the longitude, and [1] being the latitude. |
Definition at line 109 of file LGV_TZ_Lookup_Loader.class.php.
|
static |
This is the action that is called by the JSON streamer.
| $inItem | The element of the JSON file being parsed. This is one geographic area for the time zone. |
Definition at line 79 of file LGV_TZ_Lookup_Loader.class.php.
References _process_entity().
|
static |
The database object we're accessing. It's static, because that makes it easy to get in the callback.
Definition at line 60 of file LGV_TZ_Lookup_Loader.class.php.