|
| $_sdk_object |
| This is the RVP_PHP_SDK object that "owns" this object.
|
|
| $_object_id |
| This is the server unique ID of this object.
|
|
| $_object_data |
| This is any data that was associated with this object (parsed JSON).
|
|
| $_details |
| If true, then the last load was a "show details" load..
|
|
| $_plugin_path |
| This is a string that is applied to fetches to get the object.
|
|
| $_changed_states |
| This will contain an array of objects (of whatever class this is), that represent previous object states.
|
|
Definition at line 31 of file rvp_php_sdk_thing.class.php.
◆ __construct()
__construct |
( |
|
$in_sdk_object, |
|
|
|
$in_id, |
|
|
|
$in_data = NULL , |
|
|
|
$in_detailed_data = false |
|
) |
| |
- Parameters
-
$in_sdk_object | REQUIRED: The "owning" SDK object. |
$in_id | REQUIRED: The server ID of the object. An integer. |
$in_data | OPTIONAL: Parsed JSON Data for the object. Default is NULL. |
$in_detailed_data | OPTIONAL: Ignored if $in_data is NULL. Default is false. If true, then the data sent in was in "detailed" format. |
Definition at line 127 of file rvp_php_sdk_thing.class.php.
132 parent::__construct($in_sdk_object, $in_id, $in_data, $in_detailed_data,
'things');
◆ _save_data()
_save_data |
( |
|
$in_args = '' , |
|
|
|
$in_payload = NULL , |
|
|
|
$in_new_child_ids = NULL |
|
) |
| |
|
protected |
- Returns
- true, if the save was successful.
- Parameters
-
$in_args | OPTIONAL: Default is an empty string. This is any previous arguments. This will be appeneded to the end of the list, so it should begin with an ampersand (&), and be url-encoded. |
$in_payload | IGNORED. Just here to suppress PHP warnings. |
$in_new_child_ids | IGNORED. Just here to suppress PHP warnings. |
Definition at line 39 of file rvp_php_sdk_thing.class.php.
44 'key' => (isset($this->_object_data->key) ? trim($this->_object_data->key) : NULL),
45 'description' => (isset($this->_object_data->
description) ? trim($this->_object_data->
description) : NULL),
46 'tag2' => (isset($this->_object_data->
tag2) ? $this->_object_data->
tag2 : NULL),
47 'tag3' => (isset($this->_object_data->
tag3) ? $this->_object_data->
tag3 : NULL),
48 'tag4' => (isset($this->_object_data->
tag4) ? $this->_object_data->
tag4 : NULL),
49 'tag5' => (isset($this->_object_data->
tag5) ? $this->_object_data->
tag5 : NULL),
50 'tag6' => (isset($this->_object_data->
tag6) ? $this->_object_data->
tag6 : NULL),
51 'tag7' => (isset($this->_object_data->
tag7) ? $this->_object_data->
tag7 : NULL),
52 'tag8' => (isset($this->_object_data->
tag8) ? $this->_object_data->
tag8 : NULL),
53 'tag9' => (isset($this->_object_data->
tag9) ? $this->_object_data->
tag9 : NULL)
58 foreach ($to_set as $key => $value) {
59 if (isset($key) && isset($value)) {
60 $put_args .=
'&'.$key.
'='.urlencode(trim(strval($value)));
64 $ret = parent::_save_data($put_args.$in_args, NULL, NULL);
◆ _save_change_record()
_save_change_record |
( |
|
$in_change_record_object | ) |
|
|
protected |
This is called after a successful save. It has the change record[s], and we will parse them to save the "before" object.
- Returns
- true, if the save was successful.
- Parameters
-
$in_change_record_object | REQUIRED: The change response, as a parsed object. |
Definition at line 75 of file rvp_php_sdk_thing.class.php.
79 if (isset($in_change_record_object->things)) {
80 if (isset($in_change_record_object->things->changed_things)) {
81 if (is_array($in_change_record_object->things->changed_things)) {
82 if (count($in_change_record_object->things->changed_things)) {
83 foreach ($in_change_record_object->things->changed_things as $changed_thing) {
84 if ($before = $changed_thing->before) {
85 $this->_changed_states[] =
new RVP_PHP_SDK_Thing($this->_sdk_object, $before->id, $before,
true);
◆ _load_data()
_load_data |
( |
|
$in_force = false , |
|
|
|
$in_details = false , |
|
|
|
$in_parents = false |
|
) |
| |
|
protected |
This is the specific "load some data" method. It will send a GET REST request to the API in order to fetch information about this object.
- Returns
- true, if it loaded the data.
- Parameters
-
$in_force | OPTIONAL: If true (default is false), then the load will happen, even if we already have the data. |
$in_details | OPTIONAL: Default is false. If true, then the load will be a "show details" load, which could bring in a great deal more data. |
$in_parents | OPTIONAL: Default is false. If true, then the load will be a "show details" load, AND it will get the "parents," which can be a time-consuming operation. This will also "force" a load. |
Definition at line 103 of file rvp_php_sdk_thing.class.php.
107 $ret = parent::_load_data($in_force, $in_details, $in_parents);
110 if (isset($this->_object_data) && isset($this->_object_data->things) && is_array($this->_object_data->things) && (1 == count($this->_object_data->things))) {
111 $this->_object_data = $this->_object_data->things[0];
113 $this->_object_data = NULL;
114 $this->_details =
false;
◆ key()
This requires a detailed load.
- Returns
- the key for this thing, as a string.
Definition at line 141 of file rvp_php_sdk_thing.class.php.
146 if (isset($this->_object_data) && isset($this->_object_data->key)) {
147 $ret = $this->_object_data->key;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_key()
set_key |
( |
|
$in_new_string_value | ) |
|
Change/Set the key for this thing.
- Returns
- true, if the operation succeeds.
- Parameters
-
$in_new_string_value | REQUIRED: A string, with the new key value |
Definition at line 159 of file rvp_php_sdk_thing.class.php.
165 if (isset($this->_object_data)) {
166 $this->_object_data->key = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ description()
This requires a detailed load.
- Returns
- the description for this thing, as a string.
Definition at line 179 of file rvp_php_sdk_thing.class.php.
184 if (isset($this->_object_data) && isset($this->_object_data->key)) {
185 $ret = $this->_object_data->description;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_description()
set_description |
( |
|
$in_new_string_value | ) |
|
Change/Set the description for this thing.
- Returns
- true, if the operation succeeds.
- Parameters
-
$in_new_string_value | REQUIRED: A string, with the new description value |
Definition at line 197 of file rvp_php_sdk_thing.class.php.
203 if (isset($this->_object_data)) {
204 $this->_object_data->description = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ tag2()
This requires a detailed load.
- Returns
- the string value of Tag 2, or NULL.
Definition at line 217 of file rvp_php_sdk_thing.class.php.
222 if (isset($this->_object_data)) {
223 $ret = $this->_object_data->tag2;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_tag2()
set_tag2 |
( |
|
$in_new_string_value | ) |
|
This sets the value of tag 2.
- Returns
- true, if the operation suceeded.
- Parameters
-
$in_new_string_value | REQUIRED: The new string value to be set. If empty, then the tag is cleared. |
Definition at line 235 of file rvp_php_sdk_thing.class.php.
241 if (isset($this->_object_data)) {
242 $this->_object_data->tag2 = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ tag3()
This requires a detailed string load.
- Returns
- the string value of Tag 3, or NULL.
Definition at line 255 of file rvp_php_sdk_thing.class.php.
260 if (isset($this->_object_data)) {
261 $ret = $this->_object_data->tag3;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_tag3()
set_tag3 |
( |
|
$in_new_string_value | ) |
|
This sets the value of tag 3.
- Returns
- true, if the operation suceeded.
- Parameters
-
$in_new_string_value | REQUIRED: The new string value to be set. If empty, then the tag is cleared. |
Definition at line 273 of file rvp_php_sdk_thing.class.php.
279 if (isset($this->_object_data)) {
280 $this->_object_data->tag3 = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ tag4()
This requires a detailed string load.
- Returns
- the string value of Tag 4, or NULL.
Definition at line 293 of file rvp_php_sdk_thing.class.php.
298 if (isset($this->_object_data)) {
299 $ret = $this->_object_data->tag4;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_tag4()
set_tag4 |
( |
|
$in_new_string_value | ) |
|
This sets the value of tag 4.
- Returns
- true, if the operation suceeded.
- Parameters
-
$in_new_string_value | REQUIRED: The new string value to be set. If empty, then the tag is cleared. |
Definition at line 311 of file rvp_php_sdk_thing.class.php.
317 if (isset($this->_object_data)) {
318 $this->_object_data->tag4 = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ tag5()
This requires a detailed string load.
- Returns
- the string value of Tag 5, or NULL.
Definition at line 331 of file rvp_php_sdk_thing.class.php.
336 if (isset($this->_object_data)) {
337 $ret = $this->_object_data->tag5;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_tag5()
set_tag5 |
( |
|
$in_new_string_value | ) |
|
This sets the value of tag 5.
- Returns
- true, if the operation suceeded.
- Parameters
-
$in_new_string_value | REQUIRED: The new string value to be set. If empty, then the tag is cleared. |
Definition at line 349 of file rvp_php_sdk_thing.class.php.
355 if (isset($this->_object_data)) {
356 $this->_object_data->tag5 = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ tag6()
This requires a detailed string load.
- Returns
- the string value of Tag 6, or NULL.
Definition at line 369 of file rvp_php_sdk_thing.class.php.
374 if (isset($this->_object_data)) {
375 $ret = $this->_object_data->tag6;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_tag6()
set_tag6 |
( |
|
$in_new_string_value | ) |
|
This sets the value of tag 6.
- Returns
- true, if the operation suceeded.
- Parameters
-
$in_new_string_value | REQUIRED: The new string value to be set. If empty, then the tag is cleared. |
Definition at line 387 of file rvp_php_sdk_thing.class.php.
393 if (isset($this->_object_data)) {
394 $this->_object_data->tag6 = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ tag7()
This requires a detailed string load.
- Returns
- the string value of Tag 7, or NULL.
Definition at line 407 of file rvp_php_sdk_thing.class.php.
412 if (isset($this->_object_data)) {
413 $ret = $this->_object_data->tag7;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_tag7()
set_tag7 |
( |
|
$in_new_string_value | ) |
|
This sets the value of tag 7.
- Returns
- true, if the operation suceeded.
- Parameters
-
$in_new_string_value | REQUIRED: The new string value to be set. If empty, then the tag is cleared. |
Definition at line 425 of file rvp_php_sdk_thing.class.php.
431 if (isset($this->_object_data)) {
432 $this->_object_data->tag7 = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ tag8()
This requires a detailed string load.
- Returns
- the string value of Tag 8, or NULL.
Definition at line 445 of file rvp_php_sdk_thing.class.php.
450 if (isset($this->_object_data)) {
451 $ret = $this->_object_data->tag8;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_tag8()
set_tag8 |
( |
|
$in_new_string_value | ) |
|
This sets the value of tag 8.
- Returns
- true, if the operation suceeded.
- Parameters
-
$in_new_string_value | REQUIRED: The new string value to be set. If empty, then the tag is cleared. |
Definition at line 463 of file rvp_php_sdk_thing.class.php.
469 if (isset($this->_object_data)) {
470 $this->_object_data->tag8 = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ tag9()
This requires a detailed string load.
- Returns
- the string value of Tag 9, or NULL.
Definition at line 483 of file rvp_php_sdk_thing.class.php.
488 if (isset($this->_object_data)) {
489 $ret = $this->_object_data->tag9;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_tag9()
set_tag9 |
( |
|
$in_new_string_value | ) |
|
This sets the value of tag 9.
- Returns
- true, if the operation suceeded.
- Parameters
-
$in_new_string_value | REQUIRED: The new string value to be set. If empty, then the tag is cleared. |
Definition at line 501 of file rvp_php_sdk_thing.class.php.
507 if (isset($this->_object_data)) {
508 $this->_object_data->tag9 = trim(strval($in_new_string_value));
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ coords()
This requires a load, but not a "detailed" load.
- Returns
- an associative array ('latitude' => float, 'longitude' => float), with the long/lat coordinates of the object, or NULL, if there are no long/lat coordinates.
Definition at line 91 of file a_rvp_php_sdk_data_object.class.php.
96 if (isset($this->_object_data) && isset($this->_object_data->coords)) {
97 $temp = explode(
',', $this->_object_data->coords);
98 if (isset($temp) && is_array($temp) && (1 < count($temp))) {
100 $ret[
'latitude'] = floatval($temp[0]);
101 $ret[
'longitude'] = floatval($temp[1]);
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_coords()
set_coords |
( |
|
$in_latitude, |
|
|
|
$in_longitude |
|
) |
| |
|
inherited |
This sets the new long/lat value. This sets the "real" value (or "raw" value), if the record is "fuzzed," so subsequent checks of the regular long/lat may show different results.
- Returns
- true, if it worked.
- Parameters
-
$in_latitude | REQUIRED: The new latitude value, in degrees. |
$in_longitude | REQUIRED: The new longitude value, in degrees. |
Definition at line 114 of file a_rvp_php_sdk_data_object.class.php.
121 if (isset($this->_object_data)) {
122 if ((isset($this->_object_data->raw_latitude) && isset($this->_object_data->raw_longitude)) || (isset($this->_object_data->fuzzy) && $this->_object_data->fuzzy)) {
123 $this->_object_data->raw_latitude = $in_latitude;
124 $this->_object_data->raw_longitude = $in_longitude;
126 $this->_object_data->latitude = $in_latitude;
127 $this->_object_data->longitude = $in_longitude;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ distance()
This requires a a "detailed" load.
- Returns
- the distance, if provided. Otherwise, it returns 0.
Definition at line 142 of file a_rvp_php_sdk_data_object.class.php.
147 if (isset($this->_object_data) && isset($this->_object_data->distance_in_km)) {
148 $ret = floatval($this->_object_data->distance_in_km);
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ is_fuzzy()
This requires a "detailed" load.
- Returns
- true, if the object declares that it is "fuzzy" (has location obfuscation).
Definition at line 160 of file a_rvp_php_sdk_data_object.class.php.
165 if (isset($this->_object_data) && isset($this->_object_data->fuzzy) && $this->_object_data->fuzzy) {
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ fuzz_factor()
This requires a "detailed" load.
- Returns
- a floating-point value, with the "fuzz factor" (in kilometers). You need to be logged in as an ID that has either write or "can see through the fuzz" capability on this record, or you get 0.
Definition at line 178 of file a_rvp_php_sdk_data_object.class.php.
183 if (isset($this->_object_data) && isset($this->_object_data->fuzz_factor) && floatval($this->_object_data->fuzz_factor)) {
184 $ret = floatval($this->_object_data->fuzz_factor);
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_fuzz_factor()
set_fuzz_factor |
( |
|
$in_new_factor | ) |
|
|
inherited |
Sets a new "fuzz factor." Setting to 0 or NULL turns off location obfuscation. Any positive floating-point number is the "fuzz radius," in kilometers, of the obfuscation. Long/lat returned in the normal coords() call will be obfuscated. If the user has the rights to "see through the fuzz," calls to raw_coords() will return accurate results (otherwise, they will return NULL).
- Returns
- true, if it worked.
- Parameters
-
$in_new_factor | REQUIRED: The new "fuzz factor" value. 0 or NULL will turn off location obfuscation. |
Definition at line 198 of file a_rvp_php_sdk_data_object.class.php.
202 $this->_object_data->fuzz_factor = $in_new_factor;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_can_see_through_the_fuzz()
set_can_see_through_the_fuzz |
( |
|
$in_token_id | ) |
|
|
inherited |
Sets a new "fuzz factor." Setting to 0 or NULL turns off location obfuscation. Any positive floating-point number is the "fuzz radius," in kilometers, of the obfuscation. Long/lat returned in the normal coords() call will be obfuscated. If the user has the rights to "see through the fuzz," calls to raw_coords() will return accurate results (otherwise, they will return NULL).
- Returns
- true, if it worked.
- Parameters
-
$in_token_id | REQUIRED: The new token for the "see clearly" IDs. 0 will clear this field. |
Definition at line 221 of file a_rvp_php_sdk_data_object.class.php.
225 $this->_object_data->can_see_through_the_fuzz = $in_token_id;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ raw_coords()
This requires a "detailed" load.
- Returns
- the "raw" coordinates for a "fuzzy" location, assuming the current login has rights to them. If not, it returns NULL.
Definition at line 242 of file a_rvp_php_sdk_data_object.class.php.
247 if (isset($this->_object_data) && isset($this->_object_data->raw_latitude) && isset($this->_object_data->raw_longitude)) {
249 $ret[
'latitude'] = floatval($this->_object_data->raw_latitude);
250 $ret[
'longitude'] = floatval($this->_object_data->raw_longitude);
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ payload()
This requires a "detailed" load.
- Returns
- an associative array ('data' => binary data string, 'type' => string MIME type), containing the data in the payload, and its type. The data is not Base64-encoded.
Definition at line 262 of file a_rvp_php_sdk_data_object.class.php.
267 if (isset($this->_object_data) && isset($this->_object_data->payload)) {
268 $payload_data = base64_decode($this->_object_data->payload);
271 if (base64_encode(base64_decode($payload_data)) == $payload_data) {
272 $payload_data = base64_decode($payload_data);
275 $ret = [
'data' => $payload_data];
277 if (isset($this->_object_data->payload_type)) {
278 $ret[
'type'] = str_replace(
';base64',
'', $this->_object_data->payload_type);
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_payload()
set_payload |
( |
|
$in_payload_data | ) |
|
|
inherited |
This adds (or removes) a payload from this object. It figures out the data type on its own.
- Returns
- true, if the operation succeeds.
- Parameters
-
$in_payload_data | REQUIRED (can be NULL). This is the data to set as the instance payload. It should NOT be Base64 encoded. |
Definition at line 291 of file a_rvp_php_sdk_data_object.class.php.
297 if ($in_payload_data) {
298 $temp_file = tempnam(sys_get_temp_dir(),
'RVP');
299 file_put_contents($temp_file , $in_payload_data);
300 $finfo = finfo_open(FILEINFO_MIME_TYPE);
301 $content_type = finfo_file($finfo, $temp_file);
303 $this->_object_data->payload_type = $content_type;
304 $payload = [
'data' => $in_payload_data,
'type' => $content_type];
306 $args =
'&remove_payload';
_save_change_record( $in_change_record_object)
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ children_ids()
This requires a "detailed" load.
- Returns
- an associative array ('people' => integer array of IDs, 'places' => integer array of IDs, and 'things' => integer array of IDs), containing the IDs of any "child" objects for this object.
Definition at line 327 of file a_rvp_php_sdk_data_object.class.php.
332 if (isset($this->_object_data) && isset($this->_object_data->children)) {
333 $child_data = (array)$this->_object_data->children;
335 if (count($child_data)) {
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_new_children_ids()
set_new_children_ids |
( |
|
$in_child_ids | ) |
|
|
inherited |
This sets new child object IDs for this object.
- Returns
- true, if the operation succeeded.
- Parameters
-
$in_child_ids | REQUIRED: The new children IDs. We do not separate these into different classes of ID. It's a simple integer array. This is a "delta" array. That means that what it contains are CHANGES. You ADD children by indicating positive integers. You DELETE children by indicating negative integers. If your login does not have the ability to read (write is not necessary) the child ID, then that ID is ignored. If the ID to be deleted is not in the record, then it is ignored. |
Definition at line 349 of file a_rvp_php_sdk_data_object.class.php.
_save_change_record( $in_change_record_object)
force_reload( $in_parents=false)
◆ parent_ids()
This requires a "detailed and parents" load.
NOTE:** Calling this can incur a fairly significant performance penalty!
- Returns
- an associative array ('people' => integer array of IDs, 'places' => integer array of IDs, and 'things' => integer array of IDs), containing the IDs of any "parent" objects for this object.
Definition at line 377 of file a_rvp_php_sdk_data_object.class.php.
382 if (isset($this->_object_data) && isset($this->_object_data->parents)) {
383 $parent_data = $this->_object_data->parents;
385 if (isset($parent_data) && is_array($parent_data) && count($parent_data)) {
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ get_hierarchy()
This requires a detailed data load.
This returns a recursive hierarchy of instances for this object. It returns actual object instances; not IDs, using a simple tuple.
- Returns
- an associative array. One element will be 'object', and will refer to this object. If the object has child objects, then there will be a 'children' array of more of these nodes. Leaf nodes will contain only 'object' elements.
Definition at line 401 of file a_rvp_php_sdk_data_object.class.php.
402 $ret = [
'object' => $this];
406 if (isset($this->_object_data) && isset($this->_object_data->children)) {
407 $child_data = (array)$this->_object_data->children;
409 if (count($child_data)) {
410 $ret[
'children'] = [];
411 foreach ($child_data as $plugin) {
412 if (count($plugin)) {
413 $objects = $this->_sdk_object->get_objects($plugin);
415 if (is_array($objects) && count($objects)) {
416 foreach ($objects as $object) {
417 if (method_exists($object,
'get_hierarchy')) {
418 $ret[
'children'][] = $object->get_hierarchy();
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_sdk_object()
set_sdk_object |
( |
|
$in_sdk_object | ) |
|
|
inherited |
Simple accessor to set the "owning" SDK object.
- Parameters
-
$in_sdk_object | REQUIRED: The "owning" SDK object. |
Definition at line 148 of file a_rvp_php_sdk_object.class.php.
150 $this->_sdk_object = $in_sdk_object;
◆ changes()
- Returns
- an array of instances, representing the "before" state of this object, prior to any changes made. It should be noted that the lifetime of these changes are dependent on the lifetime of this instance.
Definition at line 157 of file a_rvp_php_sdk_object.class.php.
158 return isset($this->_changed_states) ? $this->_changed_states : [];
◆ save_data()
- Returns
- true, if the save was successful.
Definition at line 165 of file a_rvp_php_sdk_object.class.php.
_save_change_record( $in_change_record_object)
_save_data( $in_args='', $in_payload=NULL, $in_new_child_ids=NULL)
◆ id()
- Returns
- the integer ID of the object; unique in the object's database.
Definition at line 177 of file a_rvp_php_sdk_object.class.php.
$_object_id
This is the server unique ID of this object.
◆ name()
This requires a load, but not a "detailed" load.
- Returns
- the string name of the object. This is the generic "object_name" column that all records have.
Definition at line 187 of file a_rvp_php_sdk_object.class.php.
192 if (isset($this->_object_data) && isset($this->_object_data->name)) {
193 $ret = $this->_object_data->name;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_name()
set_name |
( |
|
$in_new_value | ) |
|
|
inherited |
This sets the name of the object.
- Returns
- true, if the save worked.
- Parameters
-
$in_new_value | REQUIRED: A new value for the name. |
Definition at line 205 of file a_rvp_php_sdk_object.class.php.
211 if (isset($this->_object_data)) {
212 $this->_object_data->name = $in_new_value;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ lang()
This requires a load, but not a "detailed" load.
- Returns
- the string for the object's "lang" (language code) field.
Definition at line 226 of file a_rvp_php_sdk_object.class.php.
231 if (isset($this->_object_data) && isset($this->_object_data->lang)) {
232 $ret = $this->_object_data->lang;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_lang()
set_lang |
( |
|
$in_new_value | ) |
|
|
inherited |
This sets the language ID of the object.
- Returns
- true, if the save worked.
- Parameters
-
$in_new_value | REQUIRED: A new value for the language ID. |
Definition at line 244 of file a_rvp_php_sdk_object.class.php.
250 if (isset($this->_object_data)) {
251 $this->_object_data->lang = $in_new_value;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ object_access()
This requires a load, but not a "detailed" load.
- Returns
- an associative array ('read' => integer, 'write' => integer), with the tokens for the object. The tokens will only be available if they are visible to the current user, or NULL, if there are no tokens (should never happen).
Definition at line 265 of file a_rvp_php_sdk_object.class.php.
272 if (isset($this->_object_data) && isset($this->_object_data->read_token)) {
273 $read_token = intval($this->_object_data->read_token);
276 if (isset($this->_object_data) && isset($this->_object_data->write_token)) {
277 $write_token = intval($this->_object_data->write_token);
280 if ($read_token || $write_token) {
284 $ret[
'read'] = $read_token;
288 $ret[
'write'] = $write_token;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ set_object_access()
set_object_access |
( |
|
$in_new_read = NULL , |
|
|
|
$in_new_write = NULL |
|
) |
| |
|
inherited |
This sets the read and write tokens of the object.
The current login must have at least read access to each of the tokens. If a token is NULL, then the token is not changed.
- Returns
- true, if the save worked.
- Parameters
-
$in_new_read | OPTIONAL: A new read token. Default is NULL (no change). |
$in_new_write | OPTIONAL: A new write token. Default is NULL (no change). |
Definition at line 303 of file a_rvp_php_sdk_object.class.php.
310 if (isset($this->_object_data)) {
311 $this->_object_data->read_token = isset($in_new_read) ? intval($in_new_read) : $this->_object_data->read_token;
312 $this->_object_data->write_token = isset($in_new_write) ? intval($in_new_write) : $this->_object_data->write_token;
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ writeable()
This requires a load, but not a "detailed" load.
- Returns
- true, if the current login can write/modify this object.
Definition at line 326 of file a_rvp_php_sdk_object.class.php.
331 if (isset($this->_object_data) && isset($this->_object_data->writeable) && $this->_object_data->writeable) {
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ last_access()
This requires a load, but not a "detailed" load.
- Returns
- the last access date, as a timedate integer.
Definition at line 344 of file a_rvp_php_sdk_object.class.php.
349 if (isset($this->_object_data) && isset($this->_object_data->last_access)) {
350 $ret = strtotime($this->_object_data->last_access);
_load_data( $in_force=false, $in_details=false, $in_parents=false)
◆ force_reload()
force_reload |
( |
|
$in_parents = false | ) |
|
|
inherited |
This forces at least a detailed load.
This reloads the information, refreshing the object, if necessary.
- Returns
- true, if successful.
- Parameters
-
$in_parents | OPTIONAL: Default is false. If true, then the parent info is also loaded. |
Definition at line 364 of file a_rvp_php_sdk_object.class.php.
366 return $this->
_load_data(
true,
true, $in_parents);
_load_data( $in_force=false, $in_details=false, $in_parents=false)
The documentation for this class was generated from the following file: