Public Member Functions | |
__construct ( $in_db_object=NULL, $in_db_result=NULL, $in_owner_id=NULL, $in_tags_array=NULL, $in_longitude=NULL, $in_latitude=NULL, $in_fuzz_factor=NULL, $in_can_see_through_the_fuzz=NULL) | |
load_from_db ( $in_db_result) | |
update_db () | |
set_longitude ( $in_new_value) | |
set_latitude ( $in_new_value) | |
fuzz_factor () | |
is_fuzzy () | |
set_fuzz_factor ( $in_new_value) | |
raw_longitude () | |
raw_latitude () | |
longitude () | |
latitude () | |
set_can_see_through_the_fuzz ( $in_id) | |
can_see_through_the_fuzz () | |
i_can_see_clearly_now () | |
Public Member Functions inherited from CO_Main_DB_Record | |
__construct ( $in_db_object=NULL, $in_db_result=NULL, $in_owner_id=NULL, $in_tags_array=NULL) | |
set_owner_id ( $in_new_id) | |
set_tags ( $in_tags_array) | |
set_tag ( $in_tag_index, $in_tag_value) | |
get_payload () | |
set_payload ( $in_payload) | |
owner_id () | |
tags () | |
Public Member Functions inherited from A_CO_DB_Table_Base | |
__construct ( $in_db_object=NULL, $in_db_result=NULL) | |
set_batch_mode () | |
clear_batch_mode () | |
id () | |
lock () | |
locked () | |
danger_will_robinson_danger_clear_id () | |
user_can_read () | |
user_can_write () | |
set_read_security_id ($in_new_id) | |
set_write_security_id ($in_new_id) | |
set_name ($in_new_value) | |
delete_from_db () | |
reload_from_db () | |
get_access_object () | |
get_lang () | |
set_lang ( $in_lang_id=NULL) | |
Protected Member Functions | |
_default_setup () | |
_build_parameter_array () | |
_km_per_degree () | |
_fuzz_me () | |
Protected Member Functions inherited from A_CO_DB_Table_Base | |
_badger_serialize ( $in_data) | |
_badger_unserialize ( $in_data) | |
_write_to_db () | |
_seppuku () | |
Protected Attributes | |
$_longitude | |
$_latitude | |
Protected Attributes inherited from CO_Main_DB_Record | |
$_owner_id | |
$_tags | |
Protected Attributes inherited from A_CO_DB_Table_Base | |
$_db_object | |
This is the actual database object that "owns" this instance. It should not be exposed beyond this class or subclasses, thereof. More... | |
$_id | |
This is the within-table unique ID of this record. More... | |
$_batch_mode | |
If this is true, then the write_record call will not be made in update_db. It will be done when clear_batch_mode() is called, instead. More... | |
Additional Inherited Members | |
Public Attributes inherited from A_CO_DB_Table_Base | |
$class_description | |
This is a description of the class (not the instance). More... | |
$instance_description | |
This is a description that describes the instance. More... | |
$last_access | |
This is a UNIX epoch date that describes the last modification. The default is UNIX Day Two (in case of UTC timezone issues). More... | |
$name | |
This is the "object_name" string field. More... | |
$read_security_id | |
This is a single integer, defining the security ID required to view the record. If it is 0, then it is "open.". More... | |
$write_security_id | |
This is a single integer, defining the required security token to modify the record. If it is 0, then any logged-in user can modify. More... | |
$context | |
This is a mixed associative array, containing fields for the object. More... | |
$error | |
If there is an error, it is contained here, in a LGV_Error instance. More... | |
Static Public Attributes inherited from CO_Main_DB_Record | |
static | $s_table_name = 'co_data_nodes' |
This is a specialization of the basic data class, implementing the long/lat fields (built into the table structure, but unused by base classes).
It has a "fuzz factor" built in. This is because some organizations, for reasons of privacy or law, don't want exact locations disclosed.
You can define a "fuzz factor" of how many kilometers you want as a "fuzzy circle" around the point.
Definition at line 38 of file co_ll_location.class.php.
CO_LL_Location::__construct | ( | $in_db_object = NULL , |
|
$in_db_result = NULL , |
|||
$in_owner_id = NULL , |
|||
$in_tags_array = NULL , |
|||
$in_longitude = NULL , |
|||
$in_latitude = NULL , |
|||
$in_fuzz_factor = NULL , |
|||
$in_can_see_through_the_fuzz = NULL |
|||
) |
Constructor (Initializer)
$in_db_object | The database object for this instance. |
$in_db_result | The database row for this instance (associative array, with database keys). |
$in_owner_id | The ID of the object (in the database) that "owns" this instance. |
$in_tags_array | An array of strings, up to ten elements long, for the tags. |
$in_longitude | An initial longitude value. |
$in_latitude | An initial latitude value. |
$in_fuzz_factor | An initial "fuzz factor" value. |
$in_can_see_through_the_fuzz | This is a security token for being able to see the value as a raw value (unfuzzed). |
Definition at line 130 of file co_ll_location.class.php.
|
protected |
This builds up the basic section of the instance database record. It should be overloaded, and the parent called before adding new fields.
This method overloads (and calls) the base class method.
Reimplemented from CO_Main_DB_Record.
Definition at line 69 of file co_ll_location.class.php.
|
protected |
This is called to populate the object fields for this class with default values. These use the SQL table tags.
This should be subclassed, and the parent should be called before applying specific instance properties.
This method overloads (and calls) the base class method.
Reimplemented from CO_Main_DB_Record.
Definition at line 53 of file co_ll_location.class.php.
|
protected |
Definition at line 101 of file co_ll_location.class.php.
|
protected |
Definition at line 82 of file co_ll_location.class.php.
References CO_Main_Data_DB\get_accurate_distance().
CO_LL_Location::can_see_through_the_fuzz | ( | ) |
Getter for a security ID token that can see past the fuzz factor.
Definition at line 377 of file co_ll_location.class.php.
CO_LL_Location::fuzz_factor | ( | ) |
Getter for fuzz factor.
Definition at line 253 of file co_ll_location.class.php.
CO_LL_Location::i_can_see_clearly_now | ( | ) |
Definition at line 397 of file co_ll_location.class.php.
CO_LL_Location::is_fuzzy | ( | ) |
Definition at line 261 of file co_ll_location.class.php.
CO_LL_Location::latitude | ( | ) |
This returns the longitude, with any "fuzz factor" applied.
Definition at line 334 of file co_ll_location.class.php.
CO_LL_Location::load_from_db | ( | $in_db_result | ) |
This function sets up this instance, according to the DB-formatted associative array passed in.
$in_db_result | This is an associative array, formatted as a database row response. |
Reimplemented from CO_Main_DB_Record.
Reimplemented in CO_User_Collection, CO_US_Place_Collection, CO_Place_Collection, CO_KeyValue_CO_Collection, and CO_Collection.
Definition at line 166 of file co_ll_location.class.php.
CO_LL_Location::longitude | ( | ) |
This returns the longitude, with any "fuzz factor" applied.
Definition at line 324 of file co_ll_location.class.php.
CO_LL_Location::raw_latitude | ( | ) |
This returns the latitude. However, if the user is not logged in, or doesn't have read rights (which shouldn't happen, anyway), they will only get the "fuzzed" version.
Definition at line 310 of file co_ll_location.class.php.
Referenced by CO_Place\geocode_long_lat().
CO_LL_Location::raw_longitude | ( | ) |
This returns the longitude. However, if the user is not logged in, or doesn't have read rights (which shouldn't happen, anyway), they will only get the "fuzzed" version.
Definition at line 296 of file co_ll_location.class.php.
Referenced by CO_Place\geocode_long_lat().
CO_LL_Location::set_can_see_through_the_fuzz | ( | $in_id | ) |
Setter for a security ID token that can see past the fuzz factor.
$in_id | The ID to set. If 0 or NULL, the value is removed. |
Definition at line 344 of file co_ll_location.class.php.
CO_LL_Location::set_fuzz_factor | ( | $in_new_value | ) |
Setter for fuzz factor.
$in_new_value | The new value must be a positive floating-point value over (and including) 0. If zero, the factor is deleted. |
Definition at line 271 of file co_ll_location.class.php.
CO_LL_Location::set_latitude | ( | $in_new_value | ) |
Setter for latitude.
Definition at line 235 of file co_ll_location.class.php.
CO_LL_Location::set_longitude | ( | $in_new_value | ) |
Setter for longitude.
Definition at line 217 of file co_ll_location.class.php.
CO_LL_Location::update_db | ( | ) |
This is a "trigger" to update the database with the current instance state.
This checks to make sure the user has write permission before saving.
Reimplemented from A_CO_DB_Table_Base.
Definition at line 200 of file co_ll_location.class.php.
Referenced by CO_Place\set_address_element(), and CO_Place\set_address_elements().
|
protected |
Definition at line 40 of file co_ll_location.class.php.
|
protected |
Definition at line 39 of file co_ll_location.class.php.