BAOBAB
A_CO_DB_Table_Base Class Reference
Inheritance diagram for A_CO_DB_Table_Base:
Collaboration diagram for A_CO_DB_Table_Base:

Public Member Functions

 __construct ( $in_db_object=NULL, $in_db_result=NULL)
 
 set_batch_mode ()
 
 clear_batch_mode ()
 
 load_from_db ( $in_db_result)
 
 id ()
 
 lock ()
 
 locked ()
 
 danger_will_robinson_danger_clear_id ()
 
 user_can_read ()
 
 user_can_write ()
 
 set_read_security_id ($in_new_id)
 
 set_write_security_id ($in_new_id)
 
 set_name ($in_new_value)
 
 delete_from_db ()
 
 update_db ()
 
 reload_from_db ()
 
 get_access_object ()
 
 get_lang ()
 
 set_lang ( $in_lang_id=NULL)
 

Public Attributes

 $class_description
 This is a description of the class (not the instance). More...
 
 $instance_description
 This is a description that describes the instance. More...
 
 $last_access
 This is a UNIX epoch date that describes the last modification. The default is UNIX Day Two (in case of UTC timezone issues). More...
 
 $name
 This is the "object_name" string field. More...
 
 $read_security_id
 This is a single integer, defining the security ID required to view the record. If it is 0, then it is "open.". More...
 
 $write_security_id
 This is a single integer, defining the required security token to modify the record. If it is 0, then any logged-in user can modify. More...
 
 $context
 This is a mixed associative array, containing fields for the object. More...
 
 $error
 If there is an error, it is contained here, in a LGV_Error instance. More...
 

Protected Member Functions

 _default_setup ()
 
 _build_parameter_array ()
 
 _badger_serialize ( $in_data)
 
 _badger_unserialize ( $in_data)
 
 _write_to_db ()
 
 _seppuku ()
 

Protected Attributes

 $_db_object
 This is the actual database object that "owns" this instance. It should not be exposed beyond this class or subclasses, thereof. More...
 
 $_id
 This is the within-table unique ID of this record. More...
 
 $_batch_mode
 If this is true, then the write_record call will not be made in update_db. It will be done when clear_batch_mode() is called, instead. More...
 

Detailed Description

This is the abstract base class for All database records used by Badger.

Badger works on a very simple basis. All records, regardless of their ultimate implementation, have the same basic structure.

The data and security database tables each take a slightly different tack from the baseline, but this class describes the baseline, which is common to both tabases and tables.

Definition at line 43 of file a_co_db_table_base.class.php.

Constructor & Destructor Documentation

◆ __construct()

A_CO_DB_Table_Base::__construct (   $in_db_object = NULL,
  $in_db_result = NULL 
)

This is the basic constructor.

Parameters
$in_db_objectThis is the database instance that "owns" this record.
$in_db_resultThis is a database-format associative array that is used to initialize this instance.

Reimplemented in CO_Owner, CO_Security_ID, and CO_Security_Node.

Definition at line 179 of file a_co_db_table_base.class.php.

181  {
182  $this->class_description = '';
183  $this->_id = NULL;
184  $this->last_access = time();
185  $this->read_security_id = 0;
186  $this->write_security_id = 0;
187  $this->name = NULL;
188  $this->context = NULL;
189  $this->instance_description = NULL;
190  $this->_db_object = $in_db_object;
191  $this->error = NULL;
192 
193  if ($in_db_object) {
194  if (!$in_db_result) {
195  $in_db_result = $this->_default_setup();
196  }
197 
198  $this->load_from_db($in_db_result);
199  }
200  }

References _default_setup(), and load_from_db().

Here is the call graph for this function:

Member Function Documentation

◆ _badger_serialize()

A_CO_DB_Table_Base::_badger_serialize (   $in_data)
protected

This is just a 1-step abstraction for serializing data.

Returns
the serialized data, as a string.
Parameters
$in_dataThis is the data to be serialized.

Definition at line 109 of file a_co_db_table_base.class.php.

110  {
111  return serialize($in_data);
112  }

Referenced by _build_parameter_array().

Here is the caller graph for this function:

◆ _badger_unserialize()

A_CO_DB_Table_Base::_badger_unserialize (   $in_data)
protected

This is just a 1-step abstarction for unserializing data.

Returns
the un-serialized data, in data/object form.
Parameters
$in_dataThis is the data to be un-serialized.

Definition at line 120 of file a_co_db_table_base.class.php.

121  {
122  return unserialize($in_data);
123  }

Referenced by load_from_db().

Here is the caller graph for this function:

◆ _build_parameter_array()

A_CO_DB_Table_Base::_build_parameter_array ( )
protected

This builds up the basic section of the instance database record. It should be overloaded, and the parent called before adding new fields.

Returns
an associative array, in database record form.

Reimplemented in CO_Security_Login, CO_LL_Location, CO_Security_Node, and CO_Main_DB_Record.

Definition at line 83 of file a_co_db_table_base.class.php.

83  {
84  $ret = Array();
85 
86  if ($this instanceof CO_Security_ID) {
87  $this->write_security_id = -1; // These always have a -1
88  $this->read_security_id = $this->id(); // These always have their own ID set as the read ID
89  }
90 
91  $ret['id'] = $this->id();
92  $ret['access_class'] = strval(get_class($this));
93  $ret['last_access'] = strval(date('Y-m-d H:i:s'));
94  $ret['read_security_id'] = intval($this->read_security_id);
95  $ret['write_security_id'] = intval($this->write_security_id);
96  $name = trim(strval($this->name));
97  $ret['object_name'] = $name ? $name : NULL;
98  $ret['access_class_context'] = $this->context ? $this->_badger_serialize($this->context) : NULL; // If we have a context, then we serialize it for the DB.
99 
100  return $ret;
101  }
$name
This is the "object_name" string field.

References $name, _badger_serialize(), and id().

Referenced by _write_to_db().

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

◆ _default_setup()

A_CO_DB_Table_Base::_default_setup ( )
protected

This is called to populate the object fields for this class with default values. These use the SQL table tags.

This should be subclassed, and the parent should be called before applying specific instance properties.

Returns
An associative array, simulating a database read.

Reimplemented in CO_Security_Login, CO_LL_Location, CO_Security_Node, and CO_Main_DB_Record.

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

67  {
68  return Array( 'id' => 0,
69  'last_access' => 86400, // Default is first UNIX day.
70  'object_name' => '',
71  'read_security_id' => 0,
72  'write_security_id' => 0,
73  'access_class_context' => NULL
74  );
75  }

Referenced by __construct().

Here is the caller graph for this function:

◆ _seppuku()

A_CO_DB_Table_Base::_seppuku ( )
protected

This function deletes this object's record from the database.

It should be noted that a successful seppuku means the instance is no longer viable, and the ID is set to 0, which makes it a new record (if saved).

Definition at line 161 of file a_co_db_table_base.class.php.

161  {
162  $ret = false;
163 
164  if ($this->id() && isset($this->_db_object)) {
165  $ret = $this->_db_object->delete_record($this->id());
166  if ($ret) {
167  $this->_id = 0; // Make sure we have no more ID. If anyone wants to re-use this instance, it needs to become a new record.
168  }
169  }
170 
171  return $ret;
172  }

Referenced by delete_from_db().

Here is the caller graph for this function:

◆ _write_to_db()

A_CO_DB_Table_Base::_write_to_db ( )
protected

This is the fundamental database write function. It's a "trigger," and the state of the instance is what is written. If the 'id' field is 0, then a new databse row is created.

This calls the _build_parameter_array() function to create a database-format associative array that is interpreted into SQL by the "owning" database object.

Returns
false if there was an error. Otherwise, it returns the ID of the element just written (or created).

Definition at line 133 of file a_co_db_table_base.class.php.

133  {
134  $ret = false;
135 
136  if (isset($this->_db_object)) {
137  $params = $this->_build_parameter_array();
138 
139  if (isset($params) && is_array($params) && count($params)) {
140  $ret = $this->_db_object->write_record($params);
141  $this->error = $this->get_access_object()->error;
142  if ((1 < intval($ret)) && !$this->error) {
143  $this->_id = intval($ret);
144  if ($this instanceof CO_Security_ID) {
145  $this->read_security_id = $this->id(); // These always have their own ID set as the read ID
146  $this->write_security_id = -1; // These always have a -1
147  }
148  }
149  }
150  }
151 
152  return $ret;
153  }

References _build_parameter_array(), get_access_object(), and id().

Referenced by CO_Security_Login\delete_from_db(), and update_db().

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

◆ clear_batch_mode()

A_CO_DB_Table_Base::clear_batch_mode ( )

Calling this clears batch mode. It also sees if we were in batch mode previously, in which case, we call the write function.

returns true, if the write function was called and successful.

Definition at line 216 of file a_co_db_table_base.class.php.

216  {
217  $ret = false;
218 
219  $call_update = $this->_batch_mode;
220  $this->_batch_mode = false;
221  if ($call_update) {
222  $ret = $this->update_db();
223  if (method_exists($this, '_scrub')) {
224  $this->_scrub();
225  }
226  }
227 
228  return $ret;
229  }
$_batch_mode
If this is true, then the write_record call will not be made in update_db. It will be done when clear...

References $_batch_mode, and update_db().

Here is the call graph for this function:

◆ danger_will_robinson_danger_clear_id()

A_CO_DB_Table_Base::danger_will_robinson_danger_clear_id ( )

VERY DANGEROUS! This only exists as a utility for the deleter. It has to be public, because PHP does not allow "friend" classes.

DON'T CALL THIS!

Definition at line 327 of file a_co_db_table_base.class.php.

327  {
328  $this->_id = 0;
329  }

◆ delete_from_db()

A_CO_DB_Table_Base::delete_from_db ( )

This is the public database record deleter.

This checks to make sure the user has write permission before deleting.

Returns
true, if the deletion was successful.

Reimplemented in CO_Security_Login.

Definition at line 444 of file a_co_db_table_base.class.php.

444  {
445  if ($this->user_can_write()) {
446  return $this->_seppuku();
447  } else {
448  return false;
449  }
450  }

References _seppuku(), and user_can_write().

Here is the call graph for this function:

◆ get_access_object()

A_CO_DB_Table_Base::get_access_object ( )
Returns
the access object for this instance.

Definition at line 494 of file a_co_db_table_base.class.php.

494  {
495  $db_object = $this->_db_object;
496 
497  if (isset($db_object)) {
498  return $db_object->access_object;
499  }
500 
501  return NULL;
502  }
$_db_object
This is the actual database object that "owns" this instance. It should not be exposed beyond this cl...

References $_db_object.

Referenced by CO_Security_Login\__construct(), CO_User_Collection\_load_login(), _write_to_db(), CO_Security_Login\add_id(), CO_Security_Login\add_personal_token_from_current_login(), CO_Security_Login\get_logins_that_have_any_of_my_ids(), CO_Security_Login\get_user_object(), CO_Security_Login\ids(), CO_Security_Login\personal_ids(), reload_from_db(), CO_Security_Login\remove_id(), CO_Security_Login\remove_personal_token_from_this_login(), CO_Security_Login\set_ids(), CO_User_Collection\set_login(), CO_Security_Login\set_personal_ids(), CO_User_Collection\set_tag(), CO_User_Collection\set_tags(), CO_Security_Login\user_can_edit_ids(), user_can_read(), CO_Security_ID\user_can_read(), user_can_write(), and CO_Security_Login\user_can_write().

Here is the caller graph for this function:

◆ get_lang()

A_CO_DB_Table_Base::get_lang ( )
Returns
a string, with the language ID for this login.

Reimplemented in CO_User_Collection, and CO_Security_Login.

Definition at line 508 of file a_co_db_table_base.class.php.

508  {
509  $ret = CO_Config::$lang;
510 
511  // We replace the default only if we have a valid lang value.
512  if (isset($this->context['lang']) && trim($this->context['lang'])) {
513  $ret = strtolower(trim($this->context['lang'])); // Should be unneccessary, but belt and suspenders...
514  }
515 
516  return $ret;
517  }

References $lang.

◆ id()

A_CO_DB_Table_Base::id ( )

Simple accessor for the ID.

Returns
the integer ID of the instance.

Definition at line 299 of file a_co_db_table_base.class.php.

299  {
300  return $this->_id;
301  }
$_id
This is the within-table unique ID of this record.

References $_id.

Referenced by CO_Security_ID\__construct(), _build_parameter_array(), _write_to_db(), CO_Security_Login\is_god(), load_from_db(), and CO_Security_ID\load_from_db().

Here is the caller graph for this function:

◆ load_from_db()

A_CO_DB_Table_Base::load_from_db (   $in_db_result)

This function sets up this instance, according to the DB-formatted associative array passed in.

This should be subclassed, and the parent should be called before applying specific instance properties.

Returns
true, if the instance was able to set itself up to the provided array.
Parameters
$in_db_resultThis is an associative array, formatted as a database row response.

Reimplemented in CO_Security_Login, CO_Security_ID, CO_Login_Manager, CO_Cobra_Login, CO_User_Collection, CO_US_Place_Collection, CO_Place_Collection, CO_Owner, CO_KeyValue_CO_Collection, CO_Collection, CO_LL_Location, and CO_Main_DB_Record.

Definition at line 239 of file a_co_db_table_base.class.php.

240  {
241  $ret = false;
242  $this->last_access = max(86400, time()); // Just in case of badly-set clocks in the server.
243 
244  if (isset($this->_db_object) && isset($in_db_result) && isset($in_db_result['id']) && intval($in_db_result['id'])) {
245  $ret = true;
246  $this->_id = intval($in_db_result['id']);
247 
248  if (isset($in_db_result['last_access'])) {
249  $date_from_db = date_create_from_format('Y-m-d H:i:s', $in_db_result['last_access']);
250  $timestamp = date_timestamp_get($date_from_db);
251  $this->last_access = max(86400, $timestamp);
252  }
253 
254  if (isset($in_db_result['read_security_id']) && intval($in_db_result['read_security_id'])) {
255  $this->read_security_id = intval($in_db_result['read_security_id']);
256  }
257 
258  if ($this instanceof CO_Security_ID) {
259  $this->write_security_id = -1; // These always have a -1
260  if ($this->id()) {
261  $this->read_security_id = $this->id(); // These always have their own ID set as the read ID
262  }
263  } else {
264  if (isset($in_db_result['write_security_id'])) {
265  $this->write_security_id = intval($in_db_result['write_security_id']);
266  } else {
267  $this->write_security_id = $this->read_security_id ? -1 : intval($this->write_security_id); // Writing is completely blocked if we have read security, but no write security specified.
268  }
269  }
270 
271  if (isset($in_db_result['object_name'])) {
272  $this->name = strval($in_db_result['object_name']);
273  }
274 
275  if (isset($in_db_result['access_class_context'])) {
276  $serialized_context = trim(strval($in_db_result['access_class_context']));
277  if (isset($serialized_context) && $serialized_context) {
278  $serialized_context = stripslashes($serialized_context);
279  $temp_context = $this->_badger_unserialize($serialized_context);
280 
281  if ($temp_context) {
282  $this->context = $temp_context;
283  }
284  }
285  }
286  }
287 
288  $this->class_description = 'Abstract Base Class for Records -Should never be instantiated.';
289 
290  return $ret;
291  }

References _badger_unserialize(), and id().

Referenced by __construct(), and reload_from_db().

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

◆ lock()

A_CO_DB_Table_Base::lock ( )

Locks the resource by setting the read_security_id column to -2.

Returns
an integer; the previous contents of the read_security_id column.

Definition at line 309 of file a_co_db_table_base.class.php.

309  {
310  return $this->_db_object->lock_record($this->id());
311  }

◆ locked()

A_CO_DB_Table_Base::locked ( )
Returns
true, if the record is currently locked.

Definition at line 317 of file a_co_db_table_base.class.php.

317  {
318  return $this->read_security_id == -2;
319  }

◆ reload_from_db()

A_CO_DB_Table_Base::reload_from_db ( )

This gets the object data from the database, using the instance's ID, and reloads everything. It throws out the current state, and replaces it with the one stored in the database.

Returns
true, if successful

Definition at line 479 of file a_co_db_table_base.class.php.

479  {
480  $ret = false;
481  $db_result = $this->_db_object->get_single_raw_row_by_id($this->id());
482  $this->error = $this->get_access_object()->error;
483  if (!isset($this->error) || !$this->error) {
484  $ret = $this->load_from_db($db_result);
485  }
486 
487  return $ret;
488  }

References get_access_object(), and load_from_db().

Referenced by CO_Security_Login\add_personal_token_from_current_login(), and CO_Security_Login\remove_personal_token_from_this_login().

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

◆ set_batch_mode()

A_CO_DB_Table_Base::set_batch_mode ( )

Calling this sets the object into "batch mode," where we don't call the write function (we're saving it up).

Definition at line 206 of file a_co_db_table_base.class.php.

206  {
207  $this->_batch_mode = true;
208  }

◆ set_lang()

A_CO_DB_Table_Base::set_lang (   $in_lang_id = NULL)
Returns
true, if the set was successful.
Parameters
$in_lang_idThe lang ID. This is not used for the low-level error handlers (which use the server setting). It is used to determine higher-level strings.

Reimplemented in CO_Security_Login.

Definition at line 523 of file a_co_db_table_base.class.php.

524  {
525  $ret = false;
526 
527  if ($this->user_can_write()) {
528  $this->context['lang'] = strtolower(trim(strval($in_lang_id)));
529  $ret = $this->update_db();
530  }
531 
532  return $ret;
533  }

References update_db(), and user_can_write().

Here is the call graph for this function:

◆ set_name()

A_CO_DB_Table_Base::set_name (   $in_new_value)

Setter Accessor for the Object Name. Also updates the DB.

Returns
true, if a DB update was successful.
Parameters
$in_new_valueThe new value

Definition at line 424 of file a_co_db_table_base.class.php.

425  {
426  $ret = false;
427 
428  if (isset($in_new_value)) {
429  $this->name = strval($in_new_value);
430  $ret = $this->update_db();
431  }
432 
433  return $ret;
434  }

References update_db().

Here is the call graph for this function:

◆ set_read_security_id()

A_CO_DB_Table_Base::set_read_security_id (   $in_new_id)

Setter Accessor for the Read Security ID. Also updates the DB.

This checks to make sure the user has write permission before changing the ID.

Returns
true, if a DB update was successful.
Parameters
$in_new_idThe new value

Definition at line 388 of file a_co_db_table_base.class.php.

389  {
390  $ret = false;
391  if ($this->user_can_write() && isset($in_new_id)) {
392  $this->read_security_id = intval($in_new_id);
393  $ret = $this->update_db();
394  }
395 
396  return $ret;
397  }

References update_db(), and user_can_write().

Here is the call graph for this function:

◆ set_write_security_id()

A_CO_DB_Table_Base::set_write_security_id (   $in_new_id)

Setter Accessor for the Write Security ID. Also updates the DB.

This checks to make sure the user has write permission before changing the ID.

Returns
true, if a DB update was successful.
Parameters
$in_new_idThe new value

Definition at line 407 of file a_co_db_table_base.class.php.

408  {
409  $ret = false;
410  if ($this->user_can_write() && isset($in_new_id)) {
411  $this->write_security_id = intval($in_new_id);
412  $ret = $this->update_db();
413  }
414 
415  return $ret;
416  }

References update_db(), and user_can_write().

Here is the call graph for this function:

◆ update_db()

A_CO_DB_Table_Base::update_db ( )

This is a "trigger" to update the database with the current instance state.

This checks to make sure the user has write permission before saving.

Returns
true, if a DB update was successful.

Reimplemented in CO_LL_Location.

Definition at line 460 of file a_co_db_table_base.class.php.

460  {
461  if (!$this->id() || $this->user_can_write()) {
462  if (!$this->_batch_mode) {
463  return $this->_write_to_db();
464  } else {
465  return true;
466  }
467  } else {
468  return false;
469  }
470  }

References _write_to_db(), and user_can_write().

Referenced by CO_Security_Login\add_id(), CO_Security_Login\clear_api_key(), clear_batch_mode(), CO_Security_Login\set_ids(), set_lang(), CO_Security_Login\set_lang(), set_name(), CO_Main_DB_Record\set_owner_id(), CO_Security_Login\set_password_from_cleartext(), CO_Main_DB_Record\set_payload(), CO_Security_Login\set_personal_ids(), set_read_security_id(), CO_Main_DB_Record\set_tag(), CO_Main_DB_Record\set_tags(), and set_write_security_id().

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

◆ user_can_read()

A_CO_DB_Table_Base::user_can_read ( )
Returns
true, if the current logged-in user has read permission on this record.

Reimplemented in CO_Security_ID.

Definition at line 335 of file a_co_db_table_base.class.php.

335  {
336  $ret = false;
337 
338  $ids = $this->get_access_object()->get_security_ids();
339 
340  $my_read_item = intval($this->read_security_id);
341  $my_write_item = intval($this->write_security_id);
342 
343  if ((0 == $my_read_item) || $this->get_access_object()->god_mode()) {
344  $ret = true;
345  } else {
346  if (isset($ids) && is_array($ids) && count($ids)) {
347  $ret = in_array($my_read_item, $ids) || in_array($my_write_item, $ids);
348  }
349  }
350 
351  if (!$ret && $this->get_access_object()->get_login_id()) {
352  $ret = (1 == $my_read_item); // Logged-in users can read 1s.
353  }
354 
355  return $ret;
356  }

References get_access_object().

Here is the call graph for this function:

◆ user_can_write()

A_CO_DB_Table_Base::user_can_write ( )
Returns
true, if the current logged-in user has write permission on this record.

Reimplemented in CO_Security_Login.

Definition at line 362 of file a_co_db_table_base.class.php.

362  {
363  $ret = false;
364 
365  $ids = $this->get_access_object()->get_security_ids();
366 
367  $my_write_item = intval($this->write_security_id);
368  // We can never edit unless we are logged in.
369  if (((isset($ids) && is_array($ids) && count($ids)) && (0 == $my_write_item)) || $this->get_access_object()->god_mode()) {
370  $ret = true;
371  } else {
372  if (isset($ids) && is_array($ids) && count($ids)) {
373  $ret = in_array($my_write_item, $ids);
374  }
375  }
376 
377  return $ret;
378  }

References get_access_object().

Referenced by CO_User_Collection\delete_from_db(), delete_from_db(), set_lang(), CO_Main_DB_Record\set_owner_id(), CO_Main_DB_Record\set_payload(), set_read_security_id(), CO_Main_DB_Record\set_tag(), CO_User_Collection\set_tag(), CO_Main_DB_Record\set_tags(), set_write_security_id(), and update_db().

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

Member Data Documentation

◆ $_batch_mode

A_CO_DB_Table_Base::$_batch_mode
protected

If this is true, then the write_record call will not be made in update_db. It will be done when clear_batch_mode() is called, instead.

Definition at line 46 of file a_co_db_table_base.class.php.

Referenced by clear_batch_mode().

◆ $_db_object

A_CO_DB_Table_Base::$_db_object
protected

This is the actual database object that "owns" this instance. It should not be exposed beyond this class or subclasses, thereof.

Definition at line 44 of file a_co_db_table_base.class.php.

Referenced by get_access_object().

◆ $_id

A_CO_DB_Table_Base::$_id
protected

This is the within-table unique ID of this record.

Definition at line 45 of file a_co_db_table_base.class.php.

Referenced by id(), and CO_Security_Login\user_can_edit_ids().

◆ $class_description

A_CO_DB_Table_Base::$class_description

This is a description of the class (not the instance).

Definition at line 48 of file a_co_db_table_base.class.php.

◆ $context

A_CO_DB_Table_Base::$context

This is a mixed associative array, containing fields for the object.

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

◆ $error

A_CO_DB_Table_Base::$error

If there is an error, it is contained here, in a LGV_Error instance.

Definition at line 56 of file a_co_db_table_base.class.php.

◆ $instance_description

A_CO_DB_Table_Base::$instance_description

This is a description that describes the instance.

Definition at line 49 of file a_co_db_table_base.class.php.

◆ $last_access

A_CO_DB_Table_Base::$last_access

This is a UNIX epoch date that describes the last modification. The default is UNIX Day Two (in case of UTC timezone issues).

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

◆ $name

A_CO_DB_Table_Base::$name

This is the "object_name" string field.

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

Referenced by _build_parameter_array().

◆ $read_security_id

A_CO_DB_Table_Base::$read_security_id

This is a single integer, defining the security ID required to view the record. If it is 0, then it is "open.".

Definition at line 53 of file a_co_db_table_base.class.php.

◆ $write_security_id

A_CO_DB_Table_Base::$write_security_id

This is a single integer, defining the required security token to modify the record. If it is 0, then any logged-in user can modify.

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