BAOBAB
CO_Andisol Class Reference
Collaboration diagram for CO_Andisol:

Public Member Functions

 __construct ( $in_login_string_id=NULL, $in_hashed_password=NULL, $in_raw_password=NULL, $in_api_key=NULL)
 
 get_cobra_instance ()
 
 get_chameleon_instance ()
 
 valid ()
 
 logged_in ()
 
 manager ()
 
 god ()
 
 current_login ()
 
 current_user ()
 
 i_have_this_token ( $in_token_to_test)
 
 get_login_item ( $in_login_integer_id=NULL)
 
 get_login_item_by_login_string ( $in_login_string_id)
 
 get_user_from_login_string ( $in_login_string_id)
 
 who_can_see ( $in_test_target)
 
 get_data_access_class_by_id ( $in_id)
 
 get_security_access_class_by_id ( $in_id)
 
 generic_search ( $in_search_parameters=NULL, $or_search=false, $page_size=0, $initial_page=0, $and_writeable=false, $count_only=false, $ids_only=false)
 
 location_search ( $in_longitude_degrees, $in_latitude_degrees, $in_radius_kilometers, $page_size=0, $initial_page=0, $and_writeable=false, $count_only=false, $ids_only=false)
 
 get_all_users ( $and_write=false)
 
 get_all_login_users ( $and_write=false)
 
 get_all_standalone_users ( $and_write=false)
 
 tag_search ( $in_tags_associative_array, $in_or_search=false, $page_size=0, $initial_page=0, $and_writeable=false, $count_only=false, $ids_only=false)
 
 get_user_from_login ( $in_login_integer_id=NULL, $in_make_user_if_necessary=false)
 
 make_standalone_user ()
 
 create_new_standard_login ( $in_login_id, $in_cleartext_password, $in_create_this_many_personal_ids=0)
 
 create_new_manager_login ( $in_login_id, $in_cleartext_password, $in_create_this_many_personal_ids=0)
 
 create_new_user ( $in_login_string_id, $in_password=NULL, $in_display_name=NULL, $in_security_tokens=NULL, $in_read_security_id=NULL, $is_manager=false, $in_create_this_many_personal_ids=0)
 
 delete_user ( $in_login_string_id, $with_extreme_prejudice=false)
 
 get_all_logins ( $and_write=false, $in_login_string_id=NULL, $in_login_integer_id=NULL)
 
 convert_login ( $in_login_id, $in_is_login_manager=false)
 
 make_security_token ()
 
 get_multiple_data_records_by_id ( $in_id_array)
 
 get_single_data_record_by_id ( $in_id)
 
 create_general_data_item ( $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Main_DB_Record')
 
 create_collection ( $in_initial_item_ids=[], $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Collection')
 
 delete_item_by_id ( $in_item_id_integer)
 
 get_value_for_key ( $in_key, $in_classname='CO_KeyValue_CO_Collection')
 
 key_is_unique ( $in_key, $in_classname='CO_KeyValue_CO_Collection')
 
 get_object_for_key ( $in_key)
 
 delete_key ( $in_key, $in_classname='CO_KeyValue_CO_Collection')
 
 set_value_for_key ( $in_key, $in_value, $in_classname='CO_KeyValue_CO_Collection')
 
 create_ll_location ( $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_LL_Location')
 
 create_place ( $auto_resolve=true, $in_venue=NULL, $in_street_address=NULL, $in_municipality=NULL, $in_county=NULL, $in_province=NULL, $in_postal_code=NULL, $in_nation=NULL, $in_extra_info=NULL, $in_longitude_degrees=NULL, $in_latitude_degrees=NULL, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Place')
 
 create_ll_place ($in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Place')
 
 create_ll_us_place ( $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL)
 
 create_place_collection ($auto_resolve=true, $in_venue=NULL, $in_street_address=NULL, $in_municipality=NULL, $in_county=NULL, $in_province=NULL, $in_postal_code=NULL, $in_nation=NULL, $in_extra_info=NULL, $in_longitude_degrees=NULL, $in_latitude_degrees=NULL, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL)
 
 get_available_tokens ()
 
 count_all_login_objects_with_access ($in_security_token)
 
 get_all_visible_users ()
 
 get_all_visible_logins ()
 
 can_i_see_this_data_record ( $in_id)
 
 can_i_see_this_security_record ( $in_id)
 
 get_all_login_objects_with_access ( $in_security_token, $and_write=false)
 
 get_all_user_objects_with_access ( $in_security_token)
 
 fetch_backup ()
 
 check_login_exists_by_login_string ( $in_login_id_string)
 
 make_new_blank_record ( $in_classname)
 
 get_personal_security_ids ()
 
 set_personal_ids ( $in_login_id, $in_personal_ids=[])
 
 get_all_personal_ids_except_for_id ( $in_id=0)
 
 get_logins_with_personal_ids ()
 
 is_this_a_personal_id ( $in_id)
 
 is_this_a_login_id ( $in_id)
 
 add_personal_token_from_current_login ( $in_to_id, $in_id)
 
 remove_personal_token_from_this_login ( $in_to_id, $in_id)
 
 get_logins_that_have_any_of_my_ids ()
 
 get_remaining_time ($in_login_id=NULL)
 

Public Attributes

 $version
 The version indicator. More...
 
 $error
 Any errors that occured are kept here. More...
 

Protected Member Functions

 _create_db_object ( $in_classname, $in_read_security_id=1, $in_write_security_id=NULL)
 
 _make_security_token ()
 

Protected Attributes

 $_chameleon_instance = NULL
 This is the CHAMELEON instance. More...
 
 $_cobra_instance = NULL
 This is the COBRA instance. More...
 

Detailed Description

This class is the principal Model layer interface for the Rift Valley Platform. You instantiate an instance of this class, and it, in turn, will create an instance of CHAMELEON/BADGER, and, possibly, an instance of COBRA. That establishes a connection to the lower level data storage and security infrastructure.

You are to use this class for ALL access to the lower level functionality.

Definition at line 50 of file co_andisol.class.php.

Constructor & Destructor Documentation

◆ __construct()

CO_Andisol::__construct (   $in_login_string_id = NULL,
  $in_hashed_password = NULL,
  $in_raw_password = NULL,
  $in_api_key = NULL 
)

The constructor.

Default for parameters is NULL, but not supplying them will result in a non-logged-in instance of ANDISOL.

Parameters
$in_login_string_idOPTIONAL: The String login ID
$in_hashed_passwordOPTIONAL: The password, crypt-hashed
$in_raw_passwordThe password, cleartext.
$in_api_keyAn API key, for REST.

Definition at line 150 of file co_andisol.class.php.

154  {
155  $this->class_description = 'The main model interface class.';
156  $this->version = __ANDISOL_VERSION__;
157  $this->error = NULL;
158 
159  // The first thing we do, is set up any login instance, as well as any possible COBRA instance.
160  $chameleon_instance = new CO_Chameleon($in_login_string_id, $in_hashed_password, $in_raw_password, $in_api_key);
161  if (isset($chameleon_instance) && ($chameleon_instance instanceof CO_Chameleon)) {
162  if ($chameleon_instance->valid) {
163  $this->_chameleon_instance = $chameleon_instance;
164 
165  $login_item = $chameleon_instance->get_login_item();
166 
167  // COBRA requires a manager (or God).
168  if (isset($login_item) && ($chameleon_instance->god_mode() || ($login_item instanceof CO_Login_Manager))) {
169  $cobra_instance = CO_Cobra::make_cobra($chameleon_instance);
170 
171  if (isset($cobra_instance) && ($cobra_instance instanceof CO_Cobra)) {
172  $this->_cobra_instance = $cobra_instance;
173  } elseif (isset($cobra_instance) && ($cobra_instance->error instanceof LGV_Error)) {
174  $this->error = $cobra_instance->error;
175  }
176  }
177  } elseif (isset($chameleon_instance) && ($chameleon_instance->error instanceof LGV_Error)) {
178  $this->error = $chameleon_instance->error;
179  }
180  }
181 
182  // At this point, we have (or have not) logged in, and any infrastructure for logged-in operations is in place.
183  }
const __ANDISOL_VERSION__
static make_cobra($in_chameleon_instance)
This class provides a general error report, with file, method and error information.
Definition: error.class.php:32

References __ANDISOL_VERSION__, and CO_Cobra\make_cobra().

Here is the call graph for this function:

Member Function Documentation

◆ _create_db_object()

CO_Andisol::_create_db_object (   $in_classname,
  $in_read_security_id = 1,
  $in_write_security_id = NULL 
)
protected

This creates an uninitialized object, based upon the passed-in class.

Returns
a new instance of the class.
Parameters
$in_classnameREQUIRED: A classname to use.
$in_read_security_idOPTIONAL: An initial read security ID. If not specified, 1 (open to all logged-in users) will be specified.
$in_write_security_idOPTIONAL: An initial write security ID. If not specified, the current user's integer login ID will be used as the write security token.

Definition at line 67 of file co_andisol.class.php.

70  {
71  $ret = NULL;
72  if ($this->logged_in()) {
73  $instance = $this->get_chameleon_instance()->make_new_blank_record($in_classname);
74 
75  if (isset($instance) && ($instance instanceof $in_classname)) {
76  // If we did not get a specific read security ID, then we assume 1.
77  if (!isset($in_read_security_id)) {
78  $in_read_security_id = 1;
79  }
80 
81  // If we did not get a specific write security ID, then we assume the logged-in user ID.
82  if (!isset($in_write_security_id) || !intval($in_write_security_id)) {
83  $in_write_security_id = $this->get_chameleon_instance()->get_login_id();
84  }
85 
86  if ($instance->set_read_security_id($in_read_security_id)) {
87  if ($instance->set_write_security_id($in_write_security_id)) {
88  $ret = $instance;
89  } elseif (isset($instance) && ($instance instanceof A_CO_DB_Table_Base)) {
90  if ($instance->error) {
91  $this->error = $instance->error;
92  }
93 
94  $instance->delete_from_db();
95  }
96  } elseif (isset($instance) && ($instance instanceof A_CO_DB_Table_Base)) {
97  if ($instance->error) {
98  $this->error = $instance->error;
99  }
100 
101  $instance->delete_from_db();
102  }
103  } elseif (isset($instance) && ($instance instanceof A_CO_DB_Table_Base)) {
104  if ($instance->error) {
105  $this->error = $instance->error;
106  }
107 
108  $instance->delete_from_db();
109  }
110  } else {
114  }
115 
116  return $ret;
117  }
static $andisol_error_code_user_not_authorized
Definition: common.inc.php:46
static $andisol_error_name_user_not_authorized
Definition: en.php:32
static $andisol_error_desc_user_not_authorized
Definition: en.php:33

References CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_desc_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_name_user_not_authorized, get_chameleon_instance(), and logged_in().

Referenced by create_general_data_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _make_security_token()

CO_Andisol::_make_security_token ( )
protected

This creates a new security token. Only managers or God can do this.

Returns
an integer, with the new token. NULL, if this did not work.

Definition at line 126 of file co_andisol.class.php.

126  {
127  $ret = NULL;
128 
129  if ($this->manager()) {
130  $ret = $this->get_cobra_instance()->make_security_token();
131  if (0 == $ret) {
132  $ret = NULL;
133  }
134  } else {
138  }
139 
140  return $ret;
141  }

References CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_desc_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_name_user_not_authorized, get_cobra_instance(), and manager().

Referenced by make_security_token().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_personal_token_from_current_login()

CO_Andisol::add_personal_token_from_current_login (   $in_to_id,
  $in_id 
)

This adds a personal token from one ID's pool, to the regular ID pool of another ID.

Returns
true, if the operation was successful.
Parameters
$in_to_idThe ID of the object we are affecting.
$in_idThe ID (personal token) to be added.

Definition at line 1918 of file co_andisol.class.php.

1920  {
1921  return $this->get_chameleon_instance()->add_personal_token_from_current_login($in_to_id, $in_id);
1922  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ can_i_see_this_data_record()

CO_Andisol::can_i_see_this_data_record (   $in_id)

This returns true, if the current user at least has read access to the Data DB record whose ID is provided..

This is "security safe," so that means that if the user does not have rights to the row, or the row does not exist, they will get false.

Returns
a boolean, true, if the user has read access to an existing record in the Data database.
Parameters
$in_idThis is the ID of the record to check.

Definition at line 1755 of file co_andisol.class.php.

1756  {
1757  return $this->get_chameleon_instance()->can_i_see_this_data_record($in_id);
1758  }

References get_chameleon_instance().

Referenced by get_data_access_class_by_id().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ can_i_see_this_security_record()

CO_Andisol::can_i_see_this_security_record (   $in_id)

This returns true, if the current user at least has read access to the Security DB record whose ID is provided..

This is "security safe," so that means that if the user does not have rights to the row, or the row does not exist, they will get false.

Returns
a boolean, true, if the user has read access to an existing record in the Security database.
Parameters
$in_idThis is the ID of the record to check.

Definition at line 1768 of file co_andisol.class.php.

1769  {
1770  return $this->get_chameleon_instance()->can_i_see_this_security_record($in_id);
1771  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ check_login_exists_by_login_string()

CO_Andisol::check_login_exists_by_login_string (   $in_login_id_string)
Returns
true, if the given login exists, false, if not, but NULL, if there is no security DB (we're not logged in). NOTE: This is not subject to security vetting.
Parameters
$in_login_id_stringThe string login ID to check

Definition at line 1816 of file co_andisol.class.php.

1817  {
1818  return $this->get_chameleon_instance()->check_login_exists_by_login_string($in_login_id_string);
1819  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ convert_login()

CO_Andisol::convert_login (   $in_login_id,
  $in_is_login_manager = false 
)

This is the public function used to convert a login to (or from) a manager, in the security database. This can only be called from a login manager. The user is not affected, and the login IDs (tokens) are also left "as is."

Returns
the converted instance.
Parameters
$in_login_idThe login ID as text. This must be for a login that can be managed by the current manager.
$in_is_login_managerIf true, then this is a "promotion" to a a manager. If false (default), then this is a "demotion" to a standard user.

Definition at line 987 of file co_andisol.class.php.

989  {
990  return $this->get_cobra_instance()->convert_login($in_login_id, $in_is_login_manager);
991  }

References get_cobra_instance().

Here is the call graph for this function:

◆ count_all_login_objects_with_access()

CO_Andisol::count_all_login_objects_with_access (   $in_security_token)

You give a security ID, and you will get a count of all login objects that have that token in their list (or are of that ID).

This is not restricted, and will count logins that we don't otherwise know about.

It does not count the "God" admin, which always has access.

Returns
an integer, with the total count of logins with access to the ID. -1, if we are not allowed to see the token.
Parameters
$in_security_tokenAn integer, with the requested security token.

Definition at line 1726 of file co_andisol.class.php.

1727  {
1728  return $this->get_chameleon_instance()->count_all_login_objects_with_access($in_security_token);
1729  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ create_collection()

CO_Andisol::create_collection (   $in_initial_item_ids = [],
  $in_read_security_id = 1,
  $in_write_security_id = NULL,
  $in_classname = 'CO_Collection' 
)

This creates new generic collection object.

Returns
a new instance of the class.
Parameters
$in_initial_item_idsOPTIONAL: An array of integers, containing the data database IDs of existing items that are to be added to the collection. Default is empty.
$in_read_security_idOPTIONAL: An initial read security ID. If not specified, 1 (open to all logged-in users) will be specified.
$in_write_security_idOPTIONAL: An initial write security ID. If not specified, the current user's integer login ID will be used as the write security token.
$in_classnameOPTIONAL: This is the name of the class we want to create. It's optional, but leaving it out will give only the most basic collection record.

Definition at line 1071 of file co_andisol.class.php.

1075  {
1076  $ret = $this->create_general_data_item($in_read_security_id, $in_write_security_id, $in_classname);
1077 
1078  if (isset($in_initial_item_ids) && is_array($in_initial_item_ids) && count($in_initial_item_ids) && isset($ret) && ($ret instanceof CO_Collection)) {
1079  $elements = $this->get_chameleon_instance()->get_multiple_data_records_by_id($in_initial_item_ids);
1080  if (isset($this->get_chameleon_instance()->error)) {
1081  $this->error = $this->get_chameleon_instance()->error;
1082  }
1083 
1084  if (isset($elements) && is_array($elements) && count($elements) && !isset($this->error)) {
1085  if (!$ret->appendElements($elements)) {
1086  $this->error = $ret->error;
1087  $ret->delete_from_db();
1088  $ret = NULL;
1089  }
1090  } else {
1091  $ret->delete_from_db();
1092  $ret = NULL;
1093  }
1094  }
1095 
1096  return $ret;
1097  }
create_general_data_item( $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Main_DB_Record')

References create_general_data_item(), and get_chameleon_instance().

Here is the call graph for this function:

◆ create_general_data_item()

CO_Andisol::create_general_data_item (   $in_read_security_id = 1,
  $in_write_security_id = NULL,
  $in_classname = 'CO_Main_DB_Record' 
)

This creates an uninitialized object, based upon the passed-in class.

Returns
a new instance of the class.
Parameters
$in_read_security_idOPTIONAL: An initial read security ID. If not specified, 1 (open to all logged-in users) will be specified.
$in_write_security_idOPTIONAL: An initial write security ID. If not specified, the current user's integer login ID will be used as the write security token.
$in_classnameOPTIONAL: This is the name of the class we want to create. It's optional, but leaving it out will give only the most basic data record.

Definition at line 1058 of file co_andisol.class.php.

1061  {
1062  return $this->_create_db_object($in_classname, $in_read_security_id, $in_write_security_id);
1063  }
_create_db_object( $in_classname, $in_read_security_id=1, $in_write_security_id=NULL)

References _create_db_object().

Referenced by create_collection(), create_ll_location(), and create_place().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_ll_location()

CO_Andisol::create_ll_location (   $in_longitude_degrees,
  $in_latitude_degrees,
  $in_fuzz_factor = NULL,
  $in_see_clearly_id = NULL,
  $in_read_security_id = 1,
  $in_write_security_id = NULL,
  $in_classname = 'CO_LL_Location' 
)

This creates an initialized basic location object, based upon the passed-in class.

Returns
a new instance of the class.
Parameters
$in_longitude_degreesREQUIRED: The longitude, in degrees.
$in_latitude_degreesREQUIRED: The latitude, in degrees.
$in_fuzz_factorOPTIONAL: If there is a "fuzz factor" to be applied, it should be sent in as a distance in Kilometers. This creates a square, double the fuzz factor to a side, which is filled with a random value whenever the long/lat is queried. This is used when we don't want an exact location being returned. It is used to do things like preserve privacy. The "fuzzing" is done at an extremely low level, and only God, or IDs with write permission, can "see clearly." If you have the ability to "see" the exact location, then you can call special functions. Read permissions are not sufficient to "see clearly." You need to have write permissions on the object. You can also set a single security token that is allowed to see If NULL (default), or 0.0, no "fuzz factor" is applied, so the location is exact.
$in_see_clearly_idOPTIONAL: Ignored, if $in_fuzz_factor is not supplied. If $in_fuzz_factor is supplied, then this can be an ID, in addition to the write ID, that has permission to see the exact location. Default is NULL.
$in_read_security_idOPTIONAL: An initial read security ID. If not specified, 1 (open to all logged-in users) will be specified.
$in_write_security_idOPTIONAL: An initial write security ID. If not specified, the current user's integer login ID will be used as the write security token.
$in_classnameOPTIONAL: A classname to use, besides the lowest-level class. If NULL, then the CO_LL_Location class is used.

Definition at line 1221 of file co_andisol.class.php.

1236  {
1237  $ret = NULL;
1238 
1239  $instance = $this->create_general_data_item($in_read_security_id, $in_write_security_id, $in_classname);
1240 
1241  // First, make sure we're in the right ballpark.
1242  if (isset($instance) && ($instance instanceof CO_LL_Location)) {
1243  if ($instance->set_longitude($in_longitude_degrees)) {
1244  if ($instance->set_latitude($in_latitude_degrees)) {
1245  if (isset($in_fuzz_factor) && (0.0 < floatval($in_fuzz_factor))) {
1246  if ($instance->set_fuzz_factor($in_fuzz_factor)) {
1247  if (isset($in_see_clearly_id) && (0 < intval($in_see_clearly_id))) {
1248  if ($instance->set_can_see_through_the_fuzz($in_see_clearly_id)) {
1249  $ret = $instance;
1250  } else {
1251  if ($instance->error) {
1252  $this->error = $instance->error;
1253  }
1254 
1255  $instance->delete_from_db();
1256  }
1257  } else {
1258  $ret = $instance;
1259  }
1260  } else {
1261  if ($instance->error) {
1262  $this->error = $instance->error;
1263  }
1264 
1265  $instance->delete_from_db();
1266  }
1267  } else {
1268  $ret = $instance;
1269  }
1270  } else {
1271  if ($instance->error) {
1272  $this->error = $instance->error;
1273  }
1274 
1275  $instance->delete_from_db();
1276  }
1277  } else {
1278  if ($instance->error) {
1279  $this->error = $instance->error;
1280  }
1281 
1282  $instance->delete_from_db();
1283  }
1284  } else {
1285  if (isset($instance) && ($instance instanceof A_CO_DB_Table_Base)) {
1286  if ($instance->error) {
1287  $this->error = $instance->error;
1288  }
1289 
1290  $instance->delete_from_db();
1291  }
1292  }
1293 
1294  return $ret;
1295  }

References create_general_data_item().

Here is the call graph for this function:

◆ create_ll_place()

CO_Andisol::create_ll_place (   $in_longitude_degrees,
  $in_latitude_degrees,
  $in_fuzz_factor = NULL,
  $in_see_clearly_id = NULL,
  $in_read_security_id = 1,
  $in_write_security_id = NULL,
  $in_classname = 'CO_Place' 
)

This creates an initialized place location object, based upon the passed-in class. However, this method will take just a long/lat, like creating a long/lat class, and do a geocode to set the address fields.

Returns
a new instance of the class.
Parameters
$in_longitude_degreesREQUIRED: The longitude, in degrees.
$in_latitude_degreesREQUIRED: The latitude, in degrees.
$in_fuzz_factorOPTIONAL: If there is a "fuzz factor" to be applied, it should be sent in as a distance in Kilometers. This creates a square, double the fuzz factor to a side, which is filled with a random value whenever the long/lat is queried. This is used when we don't want an exact location being returned. It is used to do things like preserve privacy. The "fuzzing" is done at an extremely low level, and only God, or IDs with write permission, can "see clearly." If you have the ability to "see" the exact location, then you can call special functions. Read permissions are not sufficient to "see clearly." You need to have write permissions on the object. You can also set a single security token that is allowed to see If NULL (default), or 0.0, no "fuzz factor" is applied, so the location is exact.
$in_see_clearly_idOPTIONAL: Ignored, if $in_fuzz_factor is not supplied. If $in_fuzz_factor is supplied, then this can be an ID, in addition to the write ID, that has permission to see the exact location. Default is NULL.
$in_read_security_idOPTIONAL: An initial read security ID. If not specified, 1 (open to all logged-in users) will be specified.
$in_write_security_idOPTIONAL: An initial write security ID. If not specified, the current user's integer login ID will be used as the write security token.
$in_classnameOPTIONAL: A classname to use, besides the lowest-level class. If NULL, then the CO_Place class is used.

Definition at line 1617 of file co_andisol.class.php.

1632  {
1633  return $this->create_place(true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor, $in_see_clearly_id, $in_read_security_id, $in_write_security_id, $in_classname);
1634  }
create_place( $auto_resolve=true, $in_venue=NULL, $in_street_address=NULL, $in_municipality=NULL, $in_county=NULL, $in_province=NULL, $in_postal_code=NULL, $in_nation=NULL, $in_extra_info=NULL, $in_longitude_degrees=NULL, $in_latitude_degrees=NULL, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Place')

References create_place().

Here is the call graph for this function:

◆ create_ll_us_place()

CO_Andisol::create_ll_us_place (   $in_longitude_degrees,
  $in_latitude_degrees,
  $in_fuzz_factor = NULL,
  $in_see_clearly_id = NULL,
  $in_read_security_id = 1,
  $in_write_security_id = NULL 
)

This creates an initialized basic US place location COLLECTION object. This does not accept a classname. Use the regular function if you want to get fancy. However, this method will take just a long/lat, like creating a long/lat class, and do a geocode to set the address fields.

Returns
a new instance of the class.
Parameters
$in_longitude_degreesREQUIRED: The longitude, in degrees.
$in_latitude_degreesREQUIRED: The latitude, in degrees.
$in_fuzz_factorOPTIONAL: If there is a "fuzz factor" to be applied, it should be sent in as a distance in Kilometers. This creates a square, double the fuzz factor to a side, which is filled with a random value whenever the long/lat is queried. This is used when we don't want an exact location being returned. It is used to do things like preserve privacy. The "fuzzing" is done at an extremely low level, and only God, or IDs with write permission, can "see clearly." If you have the ability to "see" the exact location, then you can call special functions. Read permissions are not sufficient to "see clearly." You need to have write permissions on the object. You can also set a single security token that is allowed to see If NULL (default), or 0.0, no "fuzz factor" is applied, so the location is exact.
$in_see_clearly_idOPTIONAL: Ignored, if $in_fuzz_factor is not supplied. If $in_fuzz_factor is supplied, then this can be an ID, in addition to the write ID, that has permission to see the exact location. Default is NULL.
$in_read_security_idOPTIONAL: An initial read security ID. If not specified, 1 (open to all logged-in users) will be specified.
$in_write_security_idOPTIONAL: An initial write security ID. If not specified, the current user's integer login ID will be used as the write security token.

Definition at line 1643 of file co_andisol.class.php.

1657  {
1658  return $this->create_place(true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor, $in_see_clearly_id, $in_read_security_id, $in_write_security_id, 'CO_US_Place');
1659  }

References create_place().

Here is the call graph for this function:

◆ create_new_manager_login()

CO_Andisol::create_new_manager_login (   $in_login_id,
  $in_cleartext_password,
  $in_create_this_many_personal_ids = 0 
)

This is the public function used to create a new login manager login in the security database. This can only be called from a login manager.

Returns
the new CO_Login_Manager instance.
Parameters
$in_login_idThe login ID as text. It needs to be unique, within the Security database, and this will fail, if it is not.
$in_cleartext_passwordThe password to set (in cleartext). It will be stored as a hashed password.
$in_create_this_many_personal_idsThis is how many Personal tokens should be created and assigned. Default is 0.

Definition at line 715 of file co_andisol.class.php.

718  {
719  return $this->get_cobra_instance()->create_new_manager_login($in_login_id, $in_cleartext_password, $in_create_this_many_personal_ids);
720  }

References get_cobra_instance().

Here is the call graph for this function:

◆ create_new_standard_login()

CO_Andisol::create_new_standard_login (   $in_login_id,
  $in_cleartext_password,
  $in_create_this_many_personal_ids = 0 
)

This is the public function used to create a new standard login in the security database. This can only be called from a login manager.

Returns
the new CO_Cobra_Login instance.
Parameters
$in_login_idThe login ID as text. It needs to be unique, within the Security database, and this will fail, if it is not.
$in_cleartext_passwordThe password to set (in cleartext). It will be stored as a hashed password.
$in_create_this_many_personal_idsThis is how many Personal tokens should be created and assigned. Default is 0.

Definition at line 701 of file co_andisol.class.php.

704  {
705  return $this->get_cobra_instance()->create_new_standard_login($in_login_id, $in_cleartext_password, $in_create_this_many_personal_ids);
706  }

References get_cobra_instance().

Here is the call graph for this function:

◆ create_new_user()

CO_Andisol::create_new_user (   $in_login_string_id,
  $in_password = NULL,
  $in_display_name = NULL,
  $in_security_tokens = NULL,
  $in_read_security_id = NULL,
  $is_manager = false,
  $in_create_this_many_personal_ids = 0 
)

This method can only be called if the user is logged in as a Login Manager (or God). This creates a new login and user collection. Upon successful completion, both a new login, and a user collection, based upon that login, now exist. If there was an error, the user and login are deleted. It should be noted that, if the login was created, it is not really deleted, and is, instead, turned into a security token object.

Returns
a string, with the login password as cleartext (If an acceptable-length password is supplied in $in_password, that that is returned). If the operation failed, then NULL is returned.
Parameters
$in_login_string_idREQUIRED: The string login ID. It must be unique in the Security DB.
$in_passwordOPTIONAL: A new password. It must be at least as long as the minimum password length. If not supplied, an auto-generated password is created and returned as the function return. If too short, then an auto-generated password is created.
$in_display_nameOPTIONAL: A string, representing the basic "display name" to be associated with the login and user collection. If not supplied, the $in_login_string_id is used.
$in_security_tokensAny additional security tokens to apply to the new login. These must be a subset of the security tokens available to the logged-in manager. The God admin can set any tokens they want.
$in_read_security_idAn optional read security ID. If not supplied, then ID 1 (logged-in users) is set. The write security ID is always set to the ID of the login.
$is_managerIf true (default is false), then the new user will be a CO_Login_Manager object.
$in_create_this_many_personal_idsThis is how many Personal tokens should be created and assigned. Default is 0.

Definition at line 731 of file co_andisol.class.php.

738  {
739  $ret = NULL;
740 
741  if ($in_login_string_id) {
742  if ($this->manager()) { // Don't even bother unless we're a manager.
743  $login_item = NULL;
744 
745  // See if we need to auto-generate a password.
746  if (!$in_password || (strlen($in_password) < CO_Config::$min_pw_len)) {
747  $in_password = substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*~_-=+;:,.!?"), 0, CO_Config::$min_pw_len);
748  }
749 
750  if ($is_manager) { // See if they want to create a manager, or a standard login.
751  $login_item = $this->get_cobra_instance()->create_new_manager_login($in_login_string_id, $in_password, $in_create_this_many_personal_ids);
752  } else {
753  $login_item = $this->get_cobra_instance()->create_new_standard_login($in_login_string_id, $in_password, $in_create_this_many_personal_ids);
754  }
755 
756  // Make sure we got what we expect.
757  if ($login_item instanceof CO_Security_Login) {
758  // Set any provided security tokens.
759  if (is_array($in_security_tokens) && count($in_security_tokens)) {
760  $login_item->set_ids($in_security_tokens);
761  }
762 
763  // Next, set the display name.
764  $display_name = $in_display_name;
765  if (!$display_name) {
766  $display_name = $in_login_string_id;
767  }
768 
769  // Set the display name.
770  if ($login_item->set_name($display_name)) {
771  // Assuming all that went well, now we create the user item.
772  $id = $login_item->id();
773  $user_item = $this->get_cobra_instance()->get_user_from_login($id, true);
774 
775  if (isset($in_read_security_id) && intval($in_read_security_id)) {
776  if (!$user_item->set_read_security_id(intval($in_read_security_id))) {
777  $user_item->delete_from_db();
778  $login_item->delete_from_db();
779  $user_item = NULL;
780  $login_item = NULL;
784  } elseif (!$login_item->set_read_security_id($login_item->id())) {
785  $user_item->delete_from_db();
786  $login_item->delete_from_db();
787  $user_item = NULL;
788  $login_item = NULL;
792  }
793  } else { // By default, users are any-login-readable, and logins are login-user-only readable, and neither can be written except by the login.
794  if (!$user_item->set_read_security_id(1)) {
795  $user_item->delete_from_db();
796  $login_item->delete_from_db();
797  $user_item = NULL;
798  $login_item = NULL;
802  } elseif (!$login_item->set_read_security_id($login_item->id())) {
803  $user_item->delete_from_db();
804  $login_item->delete_from_db();
805  $user_item = NULL;
806  $login_item = NULL;
810  }
811  }
812 
813  if ($user_item instanceof CO_User_Collection) {
814  if ($user_item->set_name($display_name)) {
815  if ($login_item->set_password_from_cleartext($in_password)) {
816  $ret = $in_password;
817  } else {
818  $user_item->delete_from_db();
819  $login_item->delete_from_db();
820  $user_item = NULL;
821  $login_item = NULL;
825  }
826  } else {
827  $user_item->delete_from_db();
828  $login_item->delete_from_db();
829  $user_item = NULL;
830  $login_item = NULL;
834  }
835  } else {
836  $this->error = $this->get_cobra_instance()->error;
837 
838  // Just in case something was created.
839  if (isset($user_item) && ($user_item instanceof A_CO_DB_Table_Base)) {
840  $user_item->delete_from_db();
841  }
842 
843  $user_item = NULL;
844 
845  $login_item->delete_from_db();
846  $login_item = NULL;
847  if (!$this->error) {
851  }
852  }
853  } else {
854  $this->error = $this->get_cobra_instance()->error;
855  $login_item->delete_from_db();
856  $login_item = NULL;
857  if (!$this->error) {
861  }
862  }
863 
864  } else {
865  $this->error = $this->get_cobra_instance()->error;
866 
867  // Just in case something was created.
868  if (isset($login_item) && ($login_item instanceof A_CO_DB_Table_Base)) {
869  $login_item->delete_from_db();
870  }
871 
872  $login_item = NULL;
873 
874  if (!$this->error) {
878  }
879  }
880  } else {
884  }
885  }
886 
887  return $ret;
888  }
static $andisol_error_code_login_instance_failed_to_initialize
Definition: common.inc.php:47
static $andisol_error_desc_login_instance_failed_to_initialize
Definition: en.php:35
static $andisol_error_name_login_instance_failed_to_initialize
Definition: en.php:34

References CO_ANDISOL_Lang_Common\$andisol_error_code_login_instance_failed_to_initialize, CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_desc_login_instance_failed_to_initialize, CO_ANDISOL_Lang\$andisol_error_desc_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_name_login_instance_failed_to_initialize, CO_ANDISOL_Lang\$andisol_error_name_user_not_authorized, get_cobra_instance(), and manager().

Here is the call graph for this function:

◆ create_place()

CO_Andisol::create_place (   $auto_resolve = true,
  $in_venue = NULL,
  $in_street_address = NULL,
  $in_municipality = NULL,
  $in_county = NULL,
  $in_province = NULL,
  $in_postal_code = NULL,
  $in_nation = NULL,
  $in_extra_info = NULL,
  $in_longitude_degrees = NULL,
  $in_latitude_degrees = NULL,
  $in_fuzz_factor = NULL,
  $in_see_clearly_id = NULL,
  $in_read_security_id = 1,
  $in_write_security_id = NULL,
  $in_classname = 'CO_Place' 
)

This creates an initialized basic place location object, based upon the passed-in class. Although all parameters are optional, you need to specify at last enough information to specify a place.

Returns
a new instance of the class.
Parameters
$auto_resolveOPTIONAL: If false (Default is true), then we will not try to "fill in the blanks" with any missing information.
$in_venueOPTIONAL: The venue (place/building/establishment name).
$in_street_addressOPTIONAL: Ignored if $in_fuzz_factor is nonzero. The street address (including number).
$in_municipalityOPTIONAL: Ignored if $in_fuzz_factor is nonzero. The town/city.
$in_countyOPTIONAL: Ignored if $in_fuzz_factor is nonzero. The county/sub-province.
$in_provinceOPTIONAL: Ignored if $in_fuzz_factor is nonzero. The state/province/prefecture.
$in_postal_codeOPTIONAL: Ignored if $in_fuzz_factor is nonzero. The ZIP/postal code.
$in_nationOPTIONAL: Ignored if $in_fuzz_factor is nonzero. The nation.
$in_extra_infoOPTIONAL: Additional (casual text) address/location/venue information.
$in_longitude_degreesOPTIONAL: The longitude, in degrees.
$in_latitude_degreesOPTIONAL: The latitude, in degrees.
$in_fuzz_factorOPTIONAL: If there is a "fuzz factor" to be applied, it should be sent in as a distance in Kilometers. This creates a square, double the fuzz factor to a side, which is filled with a random value whenever the long/lat is queried. This is used when we don't want an exact location being returned. It is used to do things like preserve privacy. The "fuzzing" is done at an extremely low level, and only God, or IDs with write permission, can "see clearly." If you have the ability to "see" the exact location, then you can call special functions. Read permissions are not sufficient to "see clearly." You need to have write permissions on the object. You can also set a single security token that is allowed to see If NULL (default), or 0.0, no "fuzz factor" is applied, so the location is exact.
$in_see_clearly_idOPTIONAL: Ignored, if $in_fuzz_factor is not supplied. If $in_fuzz_factor is supplied, then this can be an ID, in addition to the write ID, that has permission to see the exact location. Default is NULL.
$in_read_security_idOPTIONAL: An initial read security ID. If not specified, 1 (open to all logged-in users) will be specified.
$in_write_security_idOPTIONAL: An initial write security ID. If not specified, the current user's integer login ID will be used as the write security token.
$in_classnameOPTIONAL: A classname to use, besides the lowest-level class. If NULL, then the CO_Place class is used.

Definition at line 1304 of file co_andisol.class.php.

1328  {
1329  $ret = NULL;
1330 
1331  // We can create the special US version of the place, if we know we are US (Only if we are using the generic base class).
1332  if (((strtoupper($in_nation) == 'US') || (strtoupper($in_nation) == 'USA')) && ($in_classname == 'CO_Place')) {
1333  $in_classname ='CO_US_Place';
1334  }
1335 
1336  // If we know we are US, then we don't need to specify a nation.
1337  if ($in_classname == 'CO_US_Place') {
1338  $in_nation = NULL;
1339  }
1340 
1341  // We have to have at least enough basic information to denote a place.
1342  if((isset($in_longitude_degrees) && isset($in_longitude_degrees)) ||
1343  isset($in_venue) ||
1344  isset($in_street_address) ||
1345  isset($in_municipality) ||
1346  isset($in_county) ||
1347  isset($in_province) ||
1348  isset($in_postal_code) ||
1349  isset($in_nation)) {
1350  $instance = $this->create_general_data_item($in_read_security_id, $in_write_security_id, $in_classname);
1351 
1352  // First, make sure we're in the right ballpark.
1353  if (isset($instance) && ($instance instanceof CO_Place)) {
1354  $long_lat_explicitly_set = false; // We use this to figure whether or not to do an initial lookup.
1355  $address_explicitly_set = false; // We use this to figure whether or not to do an initial geocode.
1356 
1357  // If a long/lat was provided, we start by setting that to our object.
1358  if(isset($in_longitude_degrees) && isset($in_longitude_degrees)) {
1359  if ($instance->set_longitude($in_longitude_degrees)) {
1360  if ($instance->set_latitude($in_latitude_degrees)) {
1361  $long_lat_explicitly_set = true; // This means we won't be needing a lookup.
1362  } else {
1363  if ($instance->error) {
1364  $this->error = $instance->error;
1365  }
1366 
1367  $instance->delete_from_db();
1368  $instance = NULL;
1369  }
1370  } else {
1371  if ($instance->error) {
1372  $this->error = $instance->error;
1373  }
1374 
1375  $instance->delete_from_db();
1376  $instance = NULL;
1377  }
1378  }
1379 
1380  // Next, see if a venue name was provided.
1381  if(isset($instance) && isset($in_venue)) {
1382  if ($instance->set_tag(0, $in_venue)) {
1383  $address_explicitly_set = true;
1384  } else {
1385  if ($instance->error) {
1386  $this->error = $instance->error;
1387  }
1388 
1389  $instance->delete_from_db();
1390  $instance = NULL;
1391  }
1392  }
1393 
1394  // Next, see if extra info was provided.
1395  if(isset($instance) && isset($in_extra_info)) {
1396  if (!$instance->set_tag(2, $in_extra_info)) {
1397  if ($instance->error) {
1398  $this->error = $instance->error;
1399  }
1400 
1401  $instance->delete_from_db();
1402  $instance = NULL;
1403  }
1404  }
1405 
1406  // We only allow a specific address to be entered if this is a "non-fuzzed" location. This is a security measure.
1407  if (isset($instance) && (!isset($in_fuzz_factor) || (0.0 == floatval($in_fuzz_factor)))) {
1408  // Next, see if a street address was provided.
1409  if(isset($instance) && isset($in_street_address)) {
1410  if ($instance->set_tag(1, $in_street_address)) {
1411  $address_explicitly_set = true;
1412  } else {
1413  if ($instance->error) {
1414  $this->error = $instance->error;
1415  }
1416 
1417  $instance->delete_from_db();
1418  $instance = NULL;
1419  }
1420  }
1421 
1422  // Next, see if a town was provided.
1423  if(isset($instance) && isset($in_municipality)) {
1424  if ($instance->set_tag(3, $in_municipality)) {
1425  $address_explicitly_set = true;
1426  } else {
1427  if ($instance->error) {
1428  $this->error = $instance->error;
1429  }
1430 
1431  $instance->delete_from_db();
1432  $instance = NULL;
1433  }
1434  }
1435 
1436  // Next, see if a county was provided.
1437  if(isset($instance) && isset($in_county)) {
1438  if ($instance->set_tag(4, $in_county)) {
1439  $address_explicitly_set = true;
1440  } else {
1441  if ($instance->error) {
1442  $this->error = $instance->error;
1443  }
1444 
1445  $instance->delete_from_db();
1446  $instance = NULL;
1447  }
1448  }
1449 
1450  // Next, see if a state was provided.
1451  if(isset($instance) && isset($in_province)) {
1452  if ($instance->set_tag(5, $in_province)) {
1453  $address_explicitly_set = true;
1454  } else {
1455  if ($instance->error) {
1456  $this->error = $instance->error;
1457  }
1458 
1459  $instance->delete_from_db();
1460  $instance = NULL;
1461  }
1462  }
1463 
1464  // Next, see if a ZIP code was provided.
1465  if(isset($instance) && isset($in_postal_code)) {
1466  if ($instance->set_tag(6, $in_postal_code)) {
1467  $address_explicitly_set = true;
1468  } else {
1469  if ($instance->error) {
1470  $this->error = $instance->error;
1471  }
1472 
1473  $instance->delete_from_db();
1474  $instance = NULL;
1475  }
1476  }
1477 
1478  // Next, see if a nation was provided.
1479  if(isset($instance) && isset($in_nation)) {
1480  if ($instance->set_tag(7, $in_nation)) {
1481  $address_explicitly_set = true;
1482  } else {
1483  if ($instance->error) {
1484  $this->error = $instance->error;
1485  }
1486 
1487  $instance->delete_from_db();
1488  $instance = NULL;
1489  }
1490  }
1491  } elseif (isset($instance)) {
1492  $auto_resolve = false; // We do not do an auto-lookup if we are "fuzzy."
1493 
1494  if ($instance->set_fuzz_factor($in_fuzz_factor)) {
1495  if (isset($in_see_clearly_id) && (0 < intval($in_see_clearly_id))) {
1496  if (!$instance->set_can_see_through_the_fuzz($in_see_clearly_id)) {
1497  if ($instance->error) {
1498  $this->error = $instance->error;
1499  }
1500 
1501  $instance->delete_from_db();
1502  $instance = NULL;
1503  }
1504  }
1505  } else {
1506  if ($instance->error) {
1507  $this->error = $instance->error;
1508  }
1509 
1510  $instance->delete_from_db();
1511  $instance = NULL;
1512  }
1513  }
1514 
1515  // OK. If we are here, and still have a valid instance, then we can "set it in stone," and see if we need to do a geocode.
1516  if (isset($instance)) {
1517  $instance->set_address_elements($instance->tags(), true);
1518 
1519  // If we did not explicitly set a long/lat, and have a Google API key (assumed valid), then let's try a geocode.
1520  if ($auto_resolve && !$long_lat_explicitly_set && CO_Config::$google_api_key) { // If we can do a lookup, and need to, then lets's give that a go.
1521  $long_lat = $instance->lookup_address();
1522 
1523  if (isset($long_lat) && is_array($long_lat) && (1 < count($long_lat))) {
1524  if ($instance->set_longitude($long_lat['longitude'])) {
1525  if ($instance->set_latitude($long_lat['latitude'])) {
1526  $ret = $instance; // Now we're ready for our close-up, Mr. DeMille...
1527  } else {
1528  if ($instance->error) {
1529  $this->error = $instance->error;
1530  }
1531 
1532  $instance->delete_from_db();
1533  $instance = NULL;
1534  }
1535  } else {
1536  if ($instance->error) {
1537  $this->error = $instance->error;
1538  }
1539 
1540  $instance->delete_from_db();
1541  $instance = NULL;
1542  }
1543  } else {
1544  if ($instance->error) {
1545  $this->error = $instance->error;
1546  }
1547 
1548  $instance->delete_from_db();
1549  $instance = NULL;
1550  }
1551  } else { // Otherwise, we simply send the current result back.
1552  $ret = $instance;
1553  }
1554 
1555  // If we did not explicitly set an address, and have a Google API key (assumed valid), then let's try a geocode.
1556  if ($ret && $auto_resolve && !$address_explicitly_set && CO_Config::$google_api_key) { // If we can do a lookup, and need to, then lets's give that a go.
1557  $ret = NULL; // Not so fast, Skippy.
1558  $address = $instance->geocode_long_lat();
1559  if (isset($address) && is_array($address) && (0 < count($address))) {
1560  for ($i = 0; $i < 8; $i++) {
1561  eval("\$key = CO_CHAMELEON_Lang::\$chameleon_co_place_tag_$i;");
1562 
1563  if (isset($address[$key]) && trim($address[$key])) { // Is there a venue?
1564  if (!$instance->set_tag($i, trim($address[$key]))) {
1565  if ($instance->error) {
1566  $this->error = $instance->error;
1567  }
1568 
1569  $instance->delete_from_db();
1570  $instance = NULL;
1571  break;
1572  }
1573  }
1574  }
1575 
1576  // OK. Now we can do it.
1577  if (isset($instance)) {
1578  // This sets the object up to what we just sent in.
1579  $instance->set_address_elements($instance->tags(), true);
1580  $ret = $instance;
1581  }
1582  } else {
1583  if ($instance->error) {
1584  $this->error = $instance->error;
1585  }
1586 
1587  $instance->delete_from_db();
1588  $instance = NULL;
1589  }
1590  }
1591  } else {
1595  }
1596  } else {
1600  }
1601  } else {
1605  }
1606 
1607  return $ret;
1608  }
static $andisol_error_code_location_failed_to_initialize
Definition: common.inc.php:53
static $andisol_error_code_insufficient_location_information
Definition: common.inc.php:52
static $andisol_error_name_location_failed_to_initialize
Definition: en.php:46
static $andisol_error_desc_location_failed_to_initialize
Definition: en.php:47
static $andisol_error_desc_insufficient_location_information
Definition: en.php:45
static $andisol_error_name_insufficient_location_information
Definition: en.php:44

References CO_ANDISOL_Lang_Common\$andisol_error_code_insufficient_location_information, CO_ANDISOL_Lang_Common\$andisol_error_code_location_failed_to_initialize, CO_ANDISOL_Lang\$andisol_error_desc_insufficient_location_information, CO_ANDISOL_Lang\$andisol_error_desc_location_failed_to_initialize, CO_ANDISOL_Lang\$andisol_error_name_insufficient_location_information, CO_ANDISOL_Lang\$andisol_error_name_location_failed_to_initialize, and create_general_data_item().

Referenced by create_ll_place(), create_ll_us_place(), and create_place_collection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_place_collection()

CO_Andisol::create_place_collection (   $auto_resolve = true,
  $in_venue = NULL,
  $in_street_address = NULL,
  $in_municipality = NULL,
  $in_county = NULL,
  $in_province = NULL,
  $in_postal_code = NULL,
  $in_nation = NULL,
  $in_extra_info = NULL,
  $in_longitude_degrees = NULL,
  $in_latitude_degrees = NULL,
  $in_fuzz_factor = NULL,
  $in_see_clearly_id = NULL,
  $in_read_security_id = 1,
  $in_write_security_id = NULL 
)

This creates an initialized basic place location COLLECTION object. This does not accept a classname. Use the regular function if you want to get fancy. Although all parameters are optional, you need to specify at last enough information to specify a place.

Returns
a new instance of the class.
Parameters
$auto_resolveOPTIONAL: If false (Default is true), then we will not try to "fill in the blanks" with any missing information.
$in_venueOPTIONAL: The venue (place/building/establishment name).
$in_street_addressOPTIONAL: The street address (including number).
$in_municipalityOPTIONAL: The town/city.
$in_countyOPTIONAL: The county/sub-province.
$in_provinceOPTIONAL: The state/province/prefecture.
$in_postal_codeOPTIONAL: The ZIP/postal code.
$in_nationOPTIONAL: The nation.
$in_extra_infoOPTIONAL: Additional (casual text) address/location/venue information.
$in_longitude_degreesOPTIONAL: The longitude, in degrees.
$in_latitude_degreesOPTIONAL: The latitude, in degrees.
$in_fuzz_factorOPTIONAL: If there is a "fuzz factor" to be applied, it should be sent in as a distance in Kilometers. This creates a square, double the fuzz factor to a side, which is filled with a random value whenever the long/lat is queried. This is used when we don't want an exact location being returned. It is used to do things like preserve privacy. The "fuzzing" is done at an extremely low level, and only God, or IDs with write permission, can "see clearly." If you have the ability to "see" the exact location, then you can call special functions. Read permissions are not sufficient to "see clearly." You need to have write permissions on the object. You can also set a single security token that is allowed to see If NULL (default), or 0.0, no "fuzz factor" is applied, so the location is exact.
$in_see_clearly_idOPTIONAL: Ignored, if $in_fuzz_factor is not supplied. If $in_fuzz_factor is supplied, then this can be an ID, in addition to the write ID, that has permission to see the exact location. Default is NULL.
$in_read_security_idOPTIONAL: An initial read security ID. If not specified, 1 (open to all logged-in users) will be specified.
$in_write_security_idOPTIONAL: An initial write security ID. If not specified, the current user's integer login ID will be used as the write security token.

Definition at line 1668 of file co_andisol.class.php.

1691  {
1692  $class = 'CO_Place_Collection';
1693 
1694  // We can create the special US version of the place, if we know we are US.
1695  if ((strtoupper($in_nation) == 'US') || (strtoupper($in_nation) == 'USA')) {
1696  $class ='CO_US_Place_Collection';
1697  $in_nation = NULL;
1698  }
1699 
1700  return $this->create_place($auto_resolve, $in_venue, $in_street_address, $in_municipality, $in_county, $in_province, $in_postal_code, NULL, NULL, $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor, $in_see_clearly_id, $in_read_security_id, $in_write_security_id, $class);
1701  }

References create_place().

Here is the call graph for this function:

◆ current_login()

CO_Andisol::current_login ( )
Returns
The current login Item. NULL if no login.

Definition at line 245 of file co_andisol.class.php.

245  {
246  return $this->get_login_item();
247  }
get_login_item( $in_login_integer_id=NULL)

References get_login_item().

Here is the call graph for this function:

◆ current_user()

CO_Andisol::current_user ( )
Returns
The current user Item. NULL, if no user for the current login.

Definition at line 253 of file co_andisol.class.php.

253  {
254  return $this->get_user_from_login();
255  }
get_user_from_login( $in_login_integer_id=NULL, $in_make_user_if_necessary=false)

References get_user_from_login().

Here is the call graph for this function:

◆ delete_item_by_id()

CO_Andisol::delete_item_by_id (   $in_item_id_integer)

Deletes a data item, given its integer ID.

Returns
true, if successful.
Parameters
$in_item_id_integerREQUIRED: This is the key that we are deleting. It must be a string.

Definition at line 1105 of file co_andisol.class.php.

1106  {
1107  $ret = false;
1108 
1109  if ($this->logged_in()) {
1110  $ret = $this->get_chameleon_instance()->delete_data_record($in_item_id_integer);
1111  if (isset($this->get_chameleon_instance()->error)) {
1112  $this->error = $this->get_chameleon_instance()->error;
1113  }
1114  } else {
1118  }
1119 
1120  return $ret;
1121  }

References CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_desc_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_name_user_not_authorized, get_chameleon_instance(), and logged_in().

Here is the call graph for this function:

◆ delete_key()

CO_Andisol::delete_key (   $in_key,
  $in_classname = 'CO_KeyValue_CO_Collection' 
)

This deletes a key (and its associated data).

Returns
true, if successful.
Parameters
$in_keyREQUIRED: This is the key that we are deleting. It must be a string.
$in_classnameOPTIONAL: This is the class to search for the key. The default is the base class.

Definition at line 1177 of file co_andisol.class.php.

1179  {
1180  return $this->set_value_for_key($in_key, NULL, $in_classname);
1181  }
set_value_for_key( $in_key, $in_value, $in_classname='CO_KeyValue_CO_Collection')

References set_value_for_key().

Here is the call graph for this function:

◆ delete_user()

CO_Andisol::delete_user (   $in_login_string_id,
  $with_extreme_prejudice = false 
)

This method can only be called if the user is logged in as a Login Manager (or God). This will delete both the login and the user collection for the given login ID. It should be noted that deleting a collection does not delete the data associated with that collection, unless $with_extreme_prejudice is true, and even then, only the records this manager can see will be deleted.

Returns
true, if the operation was successful.
Parameters
$in_login_string_idREQUIRED: The string login ID of the user to delete.
$with_extreme_prejudiceOPTIONAL: If true (Default is false), then the manager will delete as many of the user data points as possible (It may not be possible for the manager to delete all data, unless the manager is God).

Definition at line 898 of file co_andisol.class.php.

900  {
901  $ret = false;
902 
903  if ($in_login_string_id) {
904  if ($this->manager()) { // Don't even bother unless we're a manager.
905  // First, fetch the login item.
906  $login_item = $this->get_cobra_instance()->get_login_instance($in_login_string_id);
907  if ($login_item) {
908  // Next, get the user item.
909  $user_item = $this->get_cobra_instance()->get_user_from_login($login_item->id());
910  if ($user_item) {
911  // We have to have both the login and the user. Now, we make sure that we have write perms on both.
912  if ($login_item->user_can_write() && $user_item->user_can_write()) {
913  if ($user_item->delete_from_db($with_extreme_prejudice, true)) {
914  $ret = true;
915  } else {
916  $this->error = $user_item->error;
917  if (!$this->error) {
921  }
922  }
923  } else {
927  }
928  } else {
929  $this->error = $this->get_cobra_instance()->error;
930  if (!$this->error) {
934  }
935  }
936  } else {
937  $this->error = $this->get_cobra_instance()->error;
938  if (!$this->error) {
942  }
943  }
944  } else {
948  }
949  }
950 
951  return $ret;
952  }
static $andisol_error_code_user_not_deleted
Definition: common.inc.php:50
static $andisol_error_code_login_instance_unavailable
Definition: common.inc.php:48
static $andisol_error_code_user_instance_unavailable
Definition: common.inc.php:49
static $andisol_error_desc_user_not_deleted
Definition: en.php:41
static $andisol_error_name_user_not_deleted
Definition: en.php:40
static $andisol_error_name_login_instance_unavailable
Definition: en.php:36
static $andisol_error_desc_user_instance_unavailable
Definition: en.php:39
static $andisol_error_desc_login_instance_unavailable
Definition: en.php:37
static $andisol_error_name_user_instance_unavailable
Definition: en.php:38

References CO_ANDISOL_Lang_Common\$andisol_error_code_login_instance_unavailable, CO_ANDISOL_Lang_Common\$andisol_error_code_user_instance_unavailable, CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_authorized, CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_deleted, CO_ANDISOL_Lang\$andisol_error_desc_login_instance_unavailable, CO_ANDISOL_Lang\$andisol_error_desc_user_instance_unavailable, CO_ANDISOL_Lang\$andisol_error_desc_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_desc_user_not_deleted, CO_ANDISOL_Lang\$andisol_error_name_login_instance_unavailable, CO_ANDISOL_Lang\$andisol_error_name_user_instance_unavailable, CO_ANDISOL_Lang\$andisol_error_name_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_name_user_not_deleted, get_cobra_instance(), and manager().

Here is the call graph for this function:

◆ fetch_backup()

CO_Andisol::fetch_backup ( )

This is a special "God Mode-Only" method that dumps everything in both databases. It is used to generate a CSV backup file.

The user must be logged in as "God."

Returns
an associative array ('security' => array, 'data' => array') of two sets of associative arrays, with the dump. NULL if the user is not authorized.

Definition at line 1808 of file co_andisol.class.php.

1808  {
1809  return $this->get_chameleon_instance()->fetch_backup();
1810  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ generic_search()

CO_Andisol::generic_search (   $in_search_parameters = NULL,
  $or_search = false,
  $page_size = 0,
  $initial_page = 0,
  $and_writeable = false,
  $count_only = false,
  $ids_only = false 
)

This is a "generic" data search. It can be called from external user contexts, and allows a fairly generalized search of the "data" datasource. Sorting will be done for the "owner" and "location" values. "owner" will be sorted by the ID of the returned records, and "location" will be by distance from the center.

String searches are always case-insensitive.

All parameters are optional, but calling this "blank" will return the entire data databse (that is visible to the user).

Here are a few examples:

// Search for records with long/lat set within a 10Km radius circle (centered on Tysons Corner, VA):
$returned_array = $andisol_instance->generic_search( // The first parameter is an associative array of main search keys and values:
Array( // This is the requested location:
'location' => Array('longitude' => -77.2311,
'latitude' => 38.9187,
'radius' => 10
)
)
);
// Search for records with an access_class of CO_User_Collection:
$returned_array = $andisol_instance->generic_search( // The first parameter is an associative array of main search keys and values:
Array( // This is the requested class:
'access_class' => 'CO_User_Collection'
)
);
// Search for records with an access_class of CO_User_Collection, but this time, specify a wildcard, so you also get subclasses:
$returned_array = $andisol_instance->generic_search( // The first parameter is an associative array of main search keys and values:
Array( // This is the requested class:
'access_class' => '%_User_Collection',
'use_like' => 1
)
);
// Search for records with an object_name of "Back to Basics", and a class of CO_US_Place_Collection.
$returned_array = $andisol_instance->generic_search( // The first parameter is an associative array of main search keys and values:
Array( // This is the requested class:
'access_class' => 'CO_US_Place_Collection',
'Back to Basics'
)
);
// Search for records with an object_name of "Back to Basics", and a class of CO_US_Place_Collection. However, this time, we make it an OR search.
$returned_array = $andisol_instance->generic_search( // The first parameter is an associative array of main search keys and values:
Array( // This is the requested class:
'access_class' => 'CO_US_Place_Collection',
'Back to Basics'
),
true
);
// Search for records with an object_name of "Back to Basics", and a class of CO_US_Place_Collection. However, this time, we make it an OR search, and only the second page, with pages of ten.
$returned_array = $andisol_instance->generic_search( // The first parameter is an associative array of main search keys and values:
Array( // This is the requested class:
'access_class' => 'CO_US_Place_Collection',
'Back to Basics'
),
true,
10,
1
);
Returns
an array of instances (or integers, if $ids_only is true) that match the search parameters. If $count_only is true, then it will be a single integer, with the count of responses to the search (if a page, then this count will only be the number of items on that page).
Parameters
$in_search_parametersOPTIONAL: This is an associative array of terms to define the search. The keys should be:
  • 'id' This should be accompanied by an array of one or more integers, representing specific item IDs.
  • 'access_class' This should be accompanied by an array, containing one or more PHP class names.
  • 'name' This will contain a case-insensitive array of strings to check against the object_name column.
  • 'owner' This should be accompanied by an array of one or more integers, representing specific item IDs for "owner" objects.
  • 'tags' This should be accompanied by an array (up to 10 elements) of one or more case-insensitive strings, representing specific tag values. The position in the array denotes which tag to match, so unchecked tags should still be in the array, but empty. You don't match empty tags. You can specify an array for the values, which allows you to do an OR search for the values.
  • 'location' This is only relevant if we are searching for subclasses (or instances) of CO_LL_Location This requires that the parameter be a 3-element associative array of floating-point numbers:
    • 'longitude' This is the search center location longitude, in degrees.
    • 'latitude' This is the search center location latitude, in degrees.
    • 'radius' This is the search radius, in Kilometers.

You can specify an array for any one of the values, which allows you to do an OR search for those values ($or_search does not apply. It is only for the combination of main values). If you add an element called 'use_like' ('use_like' => 1) to the end of 'access_class', 'name' or one of the 'tags', then you can use SQL-style "wildcards" (%) in your matches. If you have 'use_like', and put just a single wildcard in quotes (''), then you are saying "not-empty." NOTE: Although this is an optional parameter, failing to provide anything could return the entire readable database.

Parameters
$or_searchOPTIONAL: If true, then the search is very wide (OR), as opposed to narrow (AND), by default. If you specify a location, then that will always be AND, but the other fields can be OR. Tags will always be searched as OR.
$page_sizeOPTIONAL: If specified with a 1-based integer, this denotes the size of a "page" of results. NOTE: This is only applicable to MySQL or Postgres, and will be ignored if the DB is not MySQL or Postgres. Default is 0.
$initial_pageOPTIONAL: This is ignored unless $page_size is greater than 0. In that case, this 0-based index will specify which page of results to return. Values beyond the maximum number of pages will result in no returned values.
$and_writeableOPTIONAL: If true, then we only want records we can modify.
$count_onlyOPTIONAL: If true (default is false), then only a single integer will be returned, with the count of items that fit the search.
$ids_onlyOPTIONAL: If true (default is false), then the return array will consist only of integers (the object IDs). If $count_only is true, this is ignored.

Definition at line 481 of file co_andisol.class.php.

515  {
516  $ret = $this->get_chameleon_instance()->generic_search($in_search_parameters, $or_search, $page_size, $initial_page, $and_writeable, $count_only, $ids_only);
517 
518  if (isset($this->get_chameleon_instance()->error)) {
519  $this->error = $this->get_chameleon_instance()->error;
520  }
521 
522  return $ret;
523  }

References get_chameleon_instance().

Referenced by get_all_login_users(), get_all_standalone_users(), get_all_users(), and location_search().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_all_login_objects_with_access()

CO_Andisol::get_all_login_objects_with_access (   $in_security_token,
  $and_write = false 
)

You give a security ID, and you will get all login objects that have that token in their list (or are of that ID).

This is restricted to use security vetting, so only logins visible to the current login.

Returns
an array of instances.
Parameters
$in_security_tokenAn integer, with the requested security token.
$and_writeIf true, then we only want ones we have write access to.

Definition at line 1781 of file co_andisol.class.php.

1783  {
1784  return $this->get_chameleon_instance()->get_all_login_objects_with_access($in_security_token, $and_write);
1785  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_all_login_users()

CO_Andisol::get_all_login_users (   $and_write = false)
Returns
an array of instances of all the users (not logins) that are visible to the current login, and that have logins, themselves. It should be noted that this will not return standalone users.
Parameters
$and_writeOPTIONAL: If true (Default is false), then we only want ones we have write access to.

Definition at line 574 of file co_andisol.class.php.

575  {
576  $ret = Array();
577 
578  $temp = $this->generic_search(Array('access_class' => Array('%_User_Collection', 'use_like' => 1), 'tags' => Array('%', 'use_like' => 1)), false, 0, 0, $and_write);
579 
580  if (isset($temp) && is_array($temp) && count($temp)) {
581  // We make sure that we don't return the God user, if there is one (unless we are God).
582  foreach ($temp as $user) {
583  $login_instance = $user->get_login_instance();
584  if (isset($login_instance) && ($login_instance instanceof CO_Security_Login)) {
585  if ($this->god() || !$user->is_god()) {
586  array_push($ret, $user);
587  }
588  }
589  }
590  }
591 
592  return $ret;
593  }
generic_search( $in_search_parameters=NULL, $or_search=false, $page_size=0, $initial_page=0, $and_writeable=false, $count_only=false, $ids_only=false)

References generic_search(), and god().

Here is the call graph for this function:

◆ get_all_logins()

CO_Andisol::get_all_logins (   $and_write = false,
  $in_login_string_id = NULL,
  $in_login_integer_id = NULL 
)
Returns
an array of instances of all the logins that are visible to the current login (or a supplied login, if in "God" mode). The user must be a manager.
Parameters
$and_writeOPTIONAL: If true (Default is false), then we only want ones we have write access to.
$in_login_string_idOPTIONAL: This is ignored, unless this is the God login. If We are logged in as God, then we can select a login via its string login ID, and see what logins are available to it. This trumps the integer ID.
$in_login_integer_idOPTIONAL: This is ignored, unless this is the God login and $in_login_string_id is not specified. If We are logged in as God, then we can select a login via its integer login ID, and see what logins are available to it.

Definition at line 958 of file co_andisol.class.php.

961  {
962  $ret = Array();
963 
964  if ($this->manager()) { // Don't even bother unless we're a manager.
965  $ret = $this->get_cobra_instance()->get_all_logins($and_write, $in_login_string_id, $in_login_integer_id);
966 
967  if (isset($this->get_cobra_instance()->error)) {
968  $this->error = $this->get_cobra_instance()->error;
969  }
970  } else {
974  }
975 
976  return $ret;
977  }

References CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_desc_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_name_user_not_authorized, get_cobra_instance(), and manager().

Here is the call graph for this function:

◆ get_all_personal_ids_except_for_id()

CO_Andisol::get_all_personal_ids_except_for_id (   $in_id = 0)

This returns just the "personal" IDs for ALL logins, EXCEPT for the given ID.

This should only be called from the ID fetcher in the access class, as it does not do a security predicate.

Returns
an array of integers, each, a personal security ID.
Parameters
$in_idThe integer ID of the row we want exempted. If not specified, then all IDs are returned.

Definition at line 1874 of file co_andisol.class.php.

1875  {
1876  return $this->get_chameleon_instance()->get_all_personal_ids_except_for_id($in_id);
1877  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_all_standalone_users()

CO_Andisol::get_all_standalone_users (   $and_write = false)
Returns
an array of instances of all the users (not logins) that are visible to the current login. It should be noted that this can return standalone users.
Parameters
$and_writeOPTIONAL: If true (Default is false), then we only want ones we have write access to.

Definition at line 599 of file co_andisol.class.php.

600  {
601  $ret = Array();
602 
603  $temp = $this->generic_search(Array('access_class' => Array('%_User_Collection', 'use_like' => 1), 'tags' => Array('')), false, 0, 0, $and_write);
604 
605  if (isset($temp) && is_array($temp) && count($temp)) {
606  // We make sure that we don't return the God user, if there is one (unless we are God).
607  foreach ($temp as $user) {
608  $login_instance = $user->get_login_instance();
609  if ($this->god() || !$user->is_god()) {
610  array_push($ret, $user);
611  }
612  }
613  }
614 
615  return $ret;
616  }

References generic_search(), and god().

Here is the call graph for this function:

◆ get_all_user_objects_with_access()

CO_Andisol::get_all_user_objects_with_access (   $in_security_token)

You give a security ID, and you will get all user objects that have a login wih that token in their list (or are of that ID).

This is restricted to use security vetting, so only users visible to the current login.

Returns
an array of instances.
Parameters
$in_security_tokenAn integer, with the requested security token.

Definition at line 1795 of file co_andisol.class.php.

1796  {
1797  return $this->get_chameleon_instance()->get_all_user_objects_with_access($in_security_token);
1798  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_all_users()

CO_Andisol::get_all_users (   $and_write = false)
Returns
an array of instances of all the users (not logins) that are visible to the current login. It should be noted that this can return standalone users.
Parameters
$and_writeOPTIONAL: If true (Default is false), then we only want ones we have write access to.

Definition at line 551 of file co_andisol.class.php.

552  {
553  $ret = Array();
554 
555  $temp = $this->generic_search(Array('access_class' => Array('%_User_Collection', 'use_like' => 1)), false, 0, 0, $and_write);
556 
557  if (isset($temp) && is_array($temp) && count($temp)) {
558  // We make sure that we don't return the God user, if there is one (unless we are God).
559  foreach ($temp as $user) {
560  $login_instance = $user->get_login_instance();
561  if ($this->god() || !$user->is_god()) {
562  array_push($ret, $user);
563  }
564  }
565  }
566 
567  return $ret;
568  }

References generic_search(), and god().

Here is the call graph for this function:

◆ get_all_visible_logins()

CO_Andisol::get_all_visible_logins ( )
Returns
a simple associative array, indexed by login (not user) IDs, with each element being an array, containing the name (usually display name) of the login object in [0], and the login ID, in [1]. It reurns ALL logins visible to the current login.

Definition at line 1743 of file co_andisol.class.php.

1743  {
1744  return $this->get_chameleon_instance->get_all_visible_users();
1745  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_all_visible_users()

CO_Andisol::get_all_visible_users ( )
Returns
a simple associative array, indexed by user (not login) IDs, with each element being the name (usually display name) of the user object. It reurns ALL users visible to the current login.

Definition at line 1735 of file co_andisol.class.php.

1735  {
1736  return $this->get_chameleon_instance()->get_all_visible_users();
1737  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_available_tokens()

CO_Andisol::get_available_tokens ( )

This fetches the list of security tokens the currently logged-in user has available. This will reload any non-God Mode IDs before fetching the IDs, in order to spike privilege escalation.

With the God Mode, you get all the security tokens.

Returns
an array of integers, with each one representing a security token. The first element will always be the ID of the user.

Definition at line 1712 of file co_andisol.class.php.

1712  {
1713  return $this->get_chameleon_instance()->get_available_tokens();
1714  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_chameleon_instance()

CO_Andisol::get_chameleon_instance ( )

◆ get_cobra_instance()

CO_Andisol::get_cobra_instance ( )
Returns
The COBRA instance. It will be NULL if the current login is not a manager or God.

Definition at line 193 of file co_andisol.class.php.

193  {
194  return $this->_cobra_instance;
195  }
$_cobra_instance
This is the COBRA instance.

References $_cobra_instance.

Referenced by _make_security_token(), convert_login(), create_new_manager_login(), create_new_standard_login(), create_new_user(), delete_user(), get_all_logins(), get_user_from_login(), make_standalone_user(), manager(), set_personal_ids(), and who_can_see().

Here is the caller graph for this function:

◆ get_data_access_class_by_id()

CO_Andisol::get_data_access_class_by_id (   $in_id)

This returns the access class for the given ID for the Data Database.

This is "security safe," so that means that if the user does not have rights to the row, they will get NULL.

Returns
a string, containing the access_class data column. NULL, if no response (like the ID does not exist, or the user does not have read rights to it).
Parameters
$in_idThis is the ID of the record to fetch.

Definition at line 367 of file co_andisol.class.php.

368  {
369  $ret = NULL;
370 
371  if ($this->get_chameleon_instance()->can_i_see_this_data_record($in_id)) {
372  $ret = $this->get_chameleon_instance()->get_data_access_class_by_id($in_id);
373  if (isset($this->get_chameleon_instance()->error)) {
374  $this->error = $this->get_chameleon_instance()->error;
375  }
376  }
377 
378  return $ret;
379  }
can_i_see_this_data_record( $in_id)

References can_i_see_this_data_record(), and get_chameleon_instance().

Here is the call graph for this function:

◆ get_login_item()

CO_Andisol::get_login_item (   $in_login_integer_id = NULL)

This returns the actual security DB login item for the requested user (or the current logged-in user).

The response is subject to standard security vetting, so there is a possibility that nothing will be returned, when there is an existing login at that ID.

Returns
the instance for the requested user. NULL, if not logged in.
Parameters
$in_login_integer_idOPTIONAL: The integer login ID to check (Default is NULL). If not-NULL, then the ID of a login instance. It must be one that the current user can see. If NULL, then the current user.

Definition at line 280 of file co_andisol.class.php.

281  {
282  $ret = NULL;
283 
284  if ($this->logged_in()) {
285  $ret = $this->get_chameleon_instance()->get_login_item($in_login_integer_id);
286  if (isset($this->get_chameleon_instance()->error)) {
287  $this->error = $this->get_chameleon_instance()->error;
288  }
289  }
290 
291  return $ret;
292  }

References get_chameleon_instance(), and logged_in().

Referenced by current_login().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_login_item_by_login_string()

CO_Andisol::get_login_item_by_login_string (   $in_login_string_id)

This returns the actual security DB login item for the requested user (or the current logged-in user).

The response is subject to standard security vetting, so there is a possibility that nothing will be returned, when there is an existing login at that ID.

Returns
the instance for the requested user. NULL, if not logged in.
Parameters
$in_login_string_idREQUIRED: The string login ID to check. It must be one that the current user can see.

Definition at line 302 of file co_andisol.class.php.

303  {
304  $ret = NULL;
305 
306  if ($this->logged_in()) {
307  $ret = $this->get_chameleon_instance()->get_login_item_by_login_string($in_login_string_id);
308 
309  if (isset($this->get_chameleon_instance()->error)) {
310  $this->error = $this->get_chameleon_instance()->error;
311  }
312  }
313 
314  return $ret;
315  }

References get_chameleon_instance(), and logged_in().

Referenced by get_user_from_login_string().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_logins_that_have_any_of_my_ids()

CO_Andisol::get_logins_that_have_any_of_my_ids ( )

This returns IDs that have our personal IDs.

Returns
an associative array of arrays of integer, keyed by integer. The key is the ID of the login, and the value is an array of integer, with the IDs that match. NULL, if an error.

Definition at line 1942 of file co_andisol.class.php.

1942  {
1943  return $this->get_chameleon_instance()->get_logins_that_have_any_of_my_ids();
1944  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_logins_with_personal_ids()

CO_Andisol::get_logins_with_personal_ids ( )

This returns IDs that have personal IDs. This only works for the God admin.

Returns
an associative array of arrays of integer, keyed by integer. The key is the ID of the login, and the value is an array of integer, with the Personal IDs that match. NULL, if an error.

Definition at line 1886 of file co_andisol.class.php.

1886  {
1887  return $this->get_chameleon_instance()->get_logins_with_personal_ids();
1888  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_multiple_data_records_by_id()

CO_Andisol::get_multiple_data_records_by_id (   $in_id_array)

This method queries the "data" databse for multiple records, given a list of IDs.

The records will not be returned if the user does not have read permission for them.

Returns
an array of instances, fetched an initialized from the database.
Parameters
$in_id_arrayREQUIRED: An array of integers, with the item IDs.

Definition at line 1016 of file co_andisol.class.php.

1017  {
1018  $ret = $this->get_chameleon_instance()->get_multiple_data_records_by_id($in_id_array);
1019 
1020  if (isset($this->get_chameleon_instance()->error)) {
1021  $this->error = $this->get_chameleon_instance()->error;
1022  }
1023 
1024  return $ret;
1025  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_object_for_key()

CO_Andisol::get_object_for_key (   $in_key)
Returns
the object that stores the given key. NULL, if no value or instance for the key.
Parameters
$in_keyREQUIRED: This is the key that we are searching for. It must be a string.

Definition at line 1160 of file co_andisol.class.php.

1161  {
1162  $ret = NULL;
1163 
1164  if ($this->valid()) {
1165  $ret = $this->get_chameleon_instance()->get_object_for_key($in_key);
1166  }
1167 
1168  return $ret;
1169  }

References get_chameleon_instance(), and valid().

Here is the call graph for this function:

◆ get_personal_security_ids()

CO_Andisol::get_personal_security_ids ( )

This fetches the list of the "personal" security tokens the currently logged-in user has available. This will reload any non-God Mode IDs before fetching the IDs, in order to spike privilege escalation. If they have God Mode, then you're pretty much screwed, anyway.

Returns
an array of integers, with each one representing a personal security token.

Definition at line 1846 of file co_andisol.class.php.

1846  {
1847  return $this->get_chameleon_instance()->get_personal_security_ids();
1848  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_remaining_time()

CO_Andisol::get_remaining_time (   $in_login_id = NULL)
Returns
a floating-point number, with the remaining login time, in seconds. -1 means no timeout. 0 means time's up.
Parameters
$in_login_idThe integer login ID to check. If not-NULL, then the ID of a login instance. It must be one that the current user can see.

Definition at line 1950 of file co_andisol.class.php.

1951  {
1952  return $this->get_chameleon_instance()->get_remaining_time($in_login_id);
1953  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_security_access_class_by_id()

CO_Andisol::get_security_access_class_by_id (   $in_id)

This returns the access class for the given ID for the Security Database.

This is "security safe," so that means that if the user does not have rights to the row, they will get NULL.

Returns
a string, containing the access_class data column. NULL, if no response (like the ID does not exist, or the user does not have read rights to it).
Parameters
$in_idThis is the ID of the record to fetch.

Definition at line 389 of file co_andisol.class.php.

390  {
391  $ret = $this->$this->get_chameleon_instance()->get_security_access_class_by_id($in_id);
392  if (isset($this->get_chameleon_instance()->error)) {
393  $this->error = $this->get_chameleon_instance()->error;
394  }
395 
396  return $ret;
397  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_single_data_record_by_id()

CO_Andisol::get_single_data_record_by_id (   $in_id)

This is a "security-safe" method for fetching a single record from the "data" database, by its ID.

Returns
a single new instance, initialized from the database.
Parameters
$in_idREQUIRED: The ID of the record to fetch.

Definition at line 1033 of file co_andisol.class.php.

1034  {
1035  $ret = $this->get_chameleon_instance()->get_single_data_record_by_id($in_id);
1036 
1037  if (isset($this->get_chameleon_instance()->error)) {
1038  $this->error = $this->get_chameleon_instance()->error;
1039  }
1040 
1041  return $ret;
1042  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ get_user_from_login()

CO_Andisol::get_user_from_login (   $in_login_integer_id = NULL,
  $in_make_user_if_necessary = false 
)

This is a special function for returning the user for a login, with the possibility of creating one, if one was not already in place. In order to potentially create a user, the current login must be a manager, $in_make_user_if_necessary must be true, and the user must not already exist (even if the current login cannot see that user).

Returns
the user collection object for a given login. If there is no login given, then the current login is assumed. This is subject to security restrictions.
Parameters
$in_login_integer_idOPTIONAL: The integer login ID that is associated with the user collection. If NULL (Default), then the current login is used.
$in_make_user_if_necessaryOPTIONAL: If true (Default is false), then the user will be created if it does not already exist. Ignored, if we are not a Login Manager.

Definition at line 651 of file co_andisol.class.php.

653  {
654  $ret = NULL;
655 
656  if ($in_make_user_if_necessary && $this->manager()) { // See if we are a manager, and they want to maybe create a new user.
657  $ret = $this->get_cobra_instance()->get_user_from_login($in_login_integer_id, $in_make_user_if_necessary);
658 
659  $this->error = isset($this->get_cobra_instance()->error) ? $this->get_cobra_instance()->error : NULL;
660  } else {
661  $ret = $this->get_chameleon_instance()->get_user_from_login($in_login_integer_id);
662 
663  $this->error = isset($this->get_chameleon_instance()->error) ? $this->get_chameleon_instance()->error : NULL;
664  }
665 
666  return $ret;
667  }

References get_chameleon_instance(), get_cobra_instance(), and manager().

Referenced by current_user(), and get_user_from_login_string().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_user_from_login_string()

CO_Andisol::get_user_from_login_string (   $in_login_string_id)
Returns
the user collection object for a given login string. If there is no login given, then the current login is assumed. This is subject to security restrictions.
Parameters
$in_login_string_idREQUIRED: The string login ID that is associated with the user collection.

Definition at line 321 of file co_andisol.class.php.

322  {
323  $ret = NULL;
324 
325  $login_item = $this->get_login_item_by_login_string($in_login_string_id);
326 
327  if (isset($login_item) && ($login_item instanceof CO_Security_Login)) {
328  $ret = $this->get_user_from_login($login_item->id());
329  }
330 
331  return $ret;
332  }
get_login_item_by_login_string( $in_login_string_id)

References get_login_item_by_login_string(), and get_user_from_login().

Here is the call graph for this function:

◆ get_value_for_key()

CO_Andisol::get_value_for_key (   $in_key,
  $in_classname = 'CO_KeyValue_CO_Collection' 
)
Returns
the value for a given key. It is dependent on the class passed in. NULL, if no value or instance for the key.
Parameters
$in_keyREQUIRED: This is the key that we are searching for. It must be a string.
$in_classnameOPTIONAL: This is the class to search for the key. The default is the base class.

Definition at line 1131 of file co_andisol.class.php.

1133  {
1134  $ret = NULL;
1135 
1136  if ($this->valid()) {
1137  $ret = $this->get_chameleon_instance()->get_value_for_key($in_key, $in_classname);
1138  if (isset($this->get_chameleon_instance()->error)) {
1139  $this->error = $this->get_chameleon_instance()->error;
1140  }
1141  }
1142 
1143  return $ret;
1144  }

References get_chameleon_instance(), and valid().

Here is the call graph for this function:

◆ god()

CO_Andisol::god ( )
Returns
true, if we are logged in as the "God" admin ID.

Definition at line 237 of file co_andisol.class.php.

237  {
238  return $this->manager() && $this->get_chameleon_instance()->god_mode();
239  }

References get_chameleon_instance(), and manager().

Referenced by get_all_login_users(), get_all_standalone_users(), and get_all_users().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ i_have_this_token()

CO_Andisol::i_have_this_token (   $in_token_to_test)

Tests a token, to see if the current user has it.

Returns
true, if the current user has the given token.
Parameters
$in_token_to_testThe token we are checking out

Definition at line 263 of file co_andisol.class.php.

264  {
265  return $this->get_chameleon_instance()->i_have_this_token($in_token_to_test);
266  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ is_this_a_login_id()

CO_Andisol::is_this_a_login_id (   $in_id)

This checks an ID, to see if it is a login ID.

Returns
true, if the ID is a login ID.
Parameters
$in_idThe ID we are checking. Must be greater than 1.

Definition at line 1907 of file co_andisol.class.php.

1908  {
1909  return $this->get_chameleon_instance()->is_this_a_login_id($in_id);
1910  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ is_this_a_personal_id()

CO_Andisol::is_this_a_personal_id (   $in_id)

This checks an ID, to see if it is a personal ID.

Returns
true, if the ID is a personal ID.
Parameters
$in_idThe ID we are checking. Must be greater than 1.

Definition at line 1896 of file co_andisol.class.php.

1897  {
1898  return $this->get_chameleon_instance()->is_this_a_personal_id($in_id);
1899  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ key_is_unique()

CO_Andisol::key_is_unique (   $in_key,
  $in_classname = 'CO_KeyValue_CO_Collection' 
)
Returns
true, if the key is unique in the DB for the given class (regardless of whether or not we can see it).
Parameters
$in_keyThe key to test (a string).
$in_classnameThis is the class to search for the key. The default is the base class.

Definition at line 1150 of file co_andisol.class.php.

1152  {
1153  return $this->get_chameleon_instance()->key_is_unique($in_key, $in_classname);
1154  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ location_search()

CO_Andisol::location_search (   $in_longitude_degrees,
  $in_latitude_degrees,
  $in_radius_kilometers,
  $page_size = 0,
  $initial_page = 0,
  $and_writeable = false,
  $count_only = false,
  $ids_only = false 
)

This is a search, based on a location and radius around that location. Only objects that have a longitude and latitude that fall within the radius will be returned. All visible classes and instances will be returned. Only location and security filtering are applied.

Returns
an array of instances (or integers, if $ids_only is true) that fit within the location center and radius. If $count_only is true, then it will be a single integer, with the count of responses to the search (if a page, then this count will only be the number of items on that page).
Parameters
$in_longitude_degreesREQUIRED: The latitude of the center, in degrees.
$in_latitude_degreesREQUIRED: The logitude of the center, in degrees.
$in_radius_kilometersREQUIRED: The search radius, in Kilomters.
$page_sizeOPTIONAL: If specified with a 1-based integer, this denotes the size of a "page" of results. NOTE: This is only applicable to MySQL or Postgres, and will be ignored if the DB is not MySQL or Postgres. Default is 0.
$initial_pageOPTIONAL: This is ignored unless $page_size is greater than 0. If so, then this 0-based index will specify which page of results to return. Values beyond the maximum number of pages will result in no returned values.
$and_writeableOPTIONAL: If true, then we only want records we can modify.
$count_onlyOPTIONAL: If true (default is false), then only a single integer will be returned, with the count of items that fit the search.
$ids_onlyOPTIONAL: If true (default is false), then the return array will consist only of integers (the object IDs). If $count_only is true, this is ignored.

Definition at line 533 of file co_andisol.class.php.

541  {
542  $ret = $this->generic_search(Array('location' => Array('longitude' => $in_longitude_degrees, 'latitude' => $in_latitude_degrees, 'radius' => $in_radius_kilometers)), false, $page_size, $initial_page, $and_writeable, $count_only, $ids_only);
543 
544  return $ret;
545  }

References generic_search().

Here is the call graph for this function:

◆ logged_in()

CO_Andisol::logged_in ( )
Returns
true, if we have actually logged into the CHAMELEON instance.

Definition at line 221 of file co_andisol.class.php.

221  {
222  return $this->valid() && ($this->get_chameleon_instance()->get_login_item() instanceof CO_Security_Login);
223  }

References get_chameleon_instance(), and valid().

Referenced by _create_db_object(), delete_item_by_id(), get_login_item(), get_login_item_by_login_string(), manager(), and set_value_for_key().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_new_blank_record()

CO_Andisol::make_new_blank_record (   $in_classname)

This method instantiates a new, default instance of a class.

The instance does not reflect a database entity until it has had its update_db() method called.

Returns
a new, uninitialized instance of the requested class.
Parameters
$in_classnameThis is the name of the class to instantiate.

Definition at line 1829 of file co_andisol.class.php.

1830  {
1831  return $this->get_chameleon_instance()->make_new_blank_record($in_classname);
1832  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ make_security_token()

CO_Andisol::make_security_token ( )

This creates a new security token. Only managers or God can do this.

Returns
an integer, with the new token. NULL, if this did not work.

Definition at line 1000 of file co_andisol.class.php.

1000  {
1001  return $this->_make_security_token();
1002  }

References _make_security_token().

Here is the call graph for this function:

◆ make_standalone_user()

CO_Andisol::make_standalone_user ( )

Creates a new "standalone" user that has no associated login instance.

Returns
the new user record.

Definition at line 675 of file co_andisol.class.php.

675  {
676  $ret = NULL;
677 
678  if ($this->manager()) { // Don't even bother unless we're a manager.
679  $ret = $login_item = $this->get_cobra_instance()->make_standalone_user();
680 
681  if (isset($ret) && ($ret instanceof CO_User_Collection)) {
682  $generic_name = sprintf(CO_ANDISOL_Lang::$andisol_new_unnamed_user_name_format, $ret->id());
683  $ret->set_name($generic_name);
684  }
685  } else {
689  }
690 
691  return $ret;
692  }
static $andisol_new_unnamed_user_name_format
Definition: en.php:48

References CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_desc_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_name_user_not_authorized, CO_ANDISOL_Lang\$andisol_new_unnamed_user_name_format, get_cobra_instance(), and manager().

Here is the call graph for this function:

◆ manager()

CO_Andisol::manager ( )
Returns
true, if we are logged in as a COBRA Login Manager or as God.

Definition at line 229 of file co_andisol.class.php.

229  {
230  return $this->logged_in() && ($this->get_cobra_instance() instanceof CO_Cobra);
231  }

References get_cobra_instance(), and logged_in().

Referenced by _make_security_token(), create_new_user(), delete_user(), get_all_logins(), get_user_from_login(), god(), make_standalone_user(), and who_can_see().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_personal_token_from_this_login()

CO_Andisol::remove_personal_token_from_this_login (   $in_to_id,
  $in_id 
)

This removes a token that is owned by one ID, from another ID.

Returns
true, if the operation was successful.
Parameters
$in_to_idThe ID of the object we are affecting.
$in_idThe ID (personal token) to be removed.

Definition at line 1930 of file co_andisol.class.php.

1932  {
1933  return $this->get_chameleon_instance()->remove_personal_token_from_this_login($in_to_id, $in_id);
1934  }

References get_chameleon_instance().

Here is the call graph for this function:

◆ set_personal_ids()

CO_Andisol::set_personal_ids (   $in_login_id,
  $in_personal_ids = [] 
)

This sets just the "personal" IDs for the given ID.

This should only be called by the "God" admin, and will fail, otherwise (returns empty array).

This is not an atomic operation. If any of the given IDs are also in the regular ID list, they will be removed from the personal IDs.

Returns
an array of integers, with the new personal security IDs (usually a copy of the input Array). It will be empty, if the procedure fails.
Parameters
$in_login_idThe ID of the login we want to modify.
$in_personal_idsAn Array of Integers, with the new personal IDs. This replaces any previous ones. If empty, then the IDs are removed.

Definition at line 1860 of file co_andisol.class.php.

1862  {
1863  return $this->get_cobra_instance()->set_personal_ids($in_login_id, $in_personal_ids);
1864  }

References get_cobra_instance().

Here is the call graph for this function:

◆ set_value_for_key()

CO_Andisol::set_value_for_key (   $in_key,
  $in_value,
  $in_classname = 'CO_KeyValue_CO_Collection' 
)

This sets a value to a key, creating the record, if need be. Passing in NULL will delete the key (if we have write access). We need to have a login for it to work at all. If the value already exists, then we need to have write access to it, or we will fail. This will only work if we are logged in.

Returns
true, if successful.
Parameters
$in_keyREQUIRED: This is the key that we are setting. It must be a string.
$in_valueREQUIRED: The value to set. If NULL, then we will delete the key.
$in_classnameOPTIONAL: This is the class to use for the key. The default is the base class.

Definition at line 1191 of file co_andisol.class.php.

1194  {
1195  $ret = NULL;
1196 
1197  if ($this->logged_in()) {
1198  $ret = $this->get_chameleon_instance()->set_value_for_key($in_key, $in_value, $in_classname);
1199  if (isset($this->get_chameleon_instance()->error)) {
1200  $this->error = $this->get_chameleon_instance()->error;
1201  }
1202  } else {
1206  }
1207 
1208  return $ret;
1209  }

References CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_desc_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_name_user_not_authorized, get_chameleon_instance(), and logged_in().

Referenced by delete_key().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tag_search()

CO_Andisol::tag_search (   $in_tags_associative_array,
  $in_or_search = false,
  $page_size = 0,
  $initial_page = 0,
  $and_writeable = false,
  $count_only = false,
  $ids_only = false 
)
Returns
an array of instances (or integers, if $ids_only is true) that match the requested tag values. If $count_only is true, then it will be a single integer, with the count of responses to the search (if a page, then this count will only be the number of items on that page).
Parameters
$in_tags_associative_arrayREQUIRED: This is an associative array, with the keys being "0" through "9". Each element will have a requested value for that element. Leaving an element out will remove it as a search factor. Adding it, but leaving it NULL or blank, means that this tag MUST be null or blank. If you add an element called 'use_like' ('use_like' => 1) to the array, then you can use SQL-style "wildcards" (%) in your matches. Unless $in_or_search is set to true, the search will be an AND search; meaning that ALL the tag values must match, in order to result in a record being returned.
$in_or_searchOPTIONAL: If true (Default is false), then the search will be an "OR" search (any of the values).
$page_sizeOPTIONAL: If specified with a 1-based integer, this denotes the size of a "page" of results. NOTE: This is only applicable to MySQL or Postgres, and will be ignored if the DB is not MySQL or Postgres. Default is 0.
$initial_pageOPTIONAL: This is ignored unless $page_size is greater than 0. If so, then this 0-based index will specify which page of results to return. Values beyond the maximum number of pages will result in no returned values.
$and_writeableOPTIONAL: If true, then we only want records we can modify.
$count_onlyOPTIONAL: If true (default is false), then only a single integer will be returned, with the count of items that fit the search.
$ids_onlyOPTIONAL: If true (default is false), then the return array will consist only of integers (the object IDs). If $count_only is true, this is ignored.

Definition at line 622 of file co_andisol.class.php.

633  {
634  $tags_array = Array();
635  $ret = Array();
636 
637  return $ret;
638  }

◆ valid()

CO_Andisol::valid ( )
Returns
true, if we have an active database connection (as represented by an active CHAMELEON instance).

Definition at line 213 of file co_andisol.class.php.

213  {
214  return (NULL != $this->get_chameleon_instance()) && ($this->get_chameleon_instance() instanceof CO_Chameleon);
215  }

References get_chameleon_instance().

Referenced by get_object_for_key(), get_value_for_key(), and logged_in().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ who_can_see()

CO_Andisol::who_can_see (   $in_test_target)

Test an item to see which logins can access it.

This is security-limited.

Returns
an array of instances of CO_Security_Login (Security Database login) items that can read/see the given item. If the read ID is 0 (open), then the function simply returns true. If nothing can see the item, then false is returned.
Parameters
$in_test_targetREQUIRED: This is an instance of a subclass of A_CO_DB_Table_Base (General Database Record).

Definition at line 342 of file co_andisol.class.php.

343  {
344  $ret = Array();
345 
346  if ($this->manager()) { // Don't even bother unless we're a manager.
347  $ret = $this->get_cobra_instance()->who_can_see($in_test_target);
348 
349  $this->error = $this->get_cobra_instance()->error;
350  } else {
354  }
355 
356  return $ret;
357  }

References CO_ANDISOL_Lang_Common\$andisol_error_code_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_desc_user_not_authorized, CO_ANDISOL_Lang\$andisol_error_name_user_not_authorized, get_cobra_instance(), and manager().

Here is the call graph for this function:

Member Data Documentation

◆ $_chameleon_instance

CO_Andisol::$_chameleon_instance = NULL
protected

This is the CHAMELEON instance.

Definition at line 51 of file co_andisol.class.php.

Referenced by get_chameleon_instance().

◆ $_cobra_instance

CO_Andisol::$_cobra_instance = NULL
protected

This is the COBRA instance.

Definition at line 52 of file co_andisol.class.php.

Referenced by get_cobra_instance().

◆ $error

CO_Andisol::$error

Any errors that occured are kept here.

Definition at line 55 of file co_andisol.class.php.

◆ $version

CO_Andisol::$version

The version indicator.

Definition at line 54 of file co_andisol.class.php.