This returns a fairly short summary of the given object.
180 $my_ids = $in_object->get_access_object()->get_security_ids();
181 $read_item = intval($in_object->read_security_id);
182 $write_item = intval($in_object->write_security_id);
185 if ((((2 > $read_item) || $in_object->get_access_object()->god_mode() || in_array($read_item, $my_ids)) && count($my_ids)) && $in_object->get_access_object()->security_db_available()) {
186 $ret[
'read_token'] = $read_item;
189 if (((2 > $read_item) || $in_object->get_access_object()->god_mode() || in_array($write_item, $my_ids) && count($my_ids)) && $in_object->get_access_object()->security_db_available()) {
190 $ret[
'write_token'] = $write_item;
193 if (isset($in_object->last_access)) {
194 $ret[
'last_access'] = date(
'Y-m-d H:i:s', $in_object->last_access);
197 if ($in_object->user_can_write()) {
198 $ret[
'writeable'] =
true;
201 if (method_exists($in_object,
'owner_id')) {
202 if (0 < intval($in_object->owner_id())) {
203 $ret[
'owner_id'] = intval($in_object->owner_id());
207 if (method_exists($in_object,
'longitude') && isset($ret[
'coords'])) {
209 $coords = array_map(
'floatval', explode(
',', $ret[
'coords']));
210 $latitude = $coords[0];
211 $longitude = $coords[1];
213 if (isset($longitude) && is_float($longitude) && isset($latitude) && is_float($latitude)) {
214 $ret[
'latitude'] = floatval($latitude);
215 $ret[
'longitude'] = floatval($longitude);
218 if ($in_object->is_fuzzy()) {
219 $ret[
'fuzzy'] =
true;
221 $cansee = intval($in_object->can_see_through_the_fuzz());
224 $ret[
'can_see_through_the_fuzz'] = $cansee;
228 if ($in_object->i_can_see_clearly_now()) {
229 $ret[
'raw_latitude'] = floatval($in_object->raw_latitude());
230 $ret[
'raw_longitude'] = floatval($in_object->raw_longitude());
231 $ret[
'fuzz_factor'] = $in_object->fuzz_factor();
236 if (method_exists($in_object,
'children')) {
238 if (0 < count($child_objects)) {
243 if ($in_show_parents && method_exists($in_object,
'who_are_my_parents')) {
244 $parent_objects = $in_object->who_are_my_parents();
245 if (isset($parent_objects) && is_array($parent_objects) && count($parent_objects)) {
246 foreach ($parent_objects as $instance) {
247 $class_name = get_class($instance);
251 $ret[
'parents'][$handler][] = $instance->id();
257 if (method_exists($in_object,
'get_payload')) {
258 $payload = $in_object->get_payload();
261 $temp_file = tempnam(sys_get_temp_dir(),
'RVP');
262 file_put_contents($temp_file , $payload);
263 $finfo = finfo_open(FILEINFO_MIME_TYPE);
264 $content_type = finfo_file($finfo, $temp_file);
265 $ret[
'payload_type'] = $content_type.
';base64';
266 $ret[
'payload'] = base64_encode($payload);
_get_short_description( $in_object)
_get_child_handler_data( $in_object)