Describes all global objects available in the organization.

@param string $object_name
@param array $options
@return array
19280
public function describe($object_name = null, $options = [])
    {
        $url = sprintf('%s/sobjects', $this->getBaseUrl());
        
        if ( ! empty($object_name)) {
            $url .= sprintf('/%s/describe', $object_name);
        }

        return $this->request($url, $options);
    }
598395
public function _get($_name)
    {
        $getMethod = 'get' . ucfirst($_name);
        if(method_exists($this,$getMethod))
            return $this->$getMethod();
        else
            return false;
    }
886063
public static function loadModel($f_name, $options = array())
    {
        $defaults = array(
            'mode'=>'default'
        );

        $options = array_merge($defaults, $options);

        return json_decode(file_get_contents($f_name), true);
    }
260557
public function get_meta( $object_type, $_null = null, $object_id = 0, $meta_key = '', $single = false ) {

		// Enforce boolean as it can be a string sometimes
		$single = filter_var( $single, FILTER_VALIDATE_BOOLEAN );

		$meta_type = $object_type;

		if ( in_array( $meta_type, array( 'post_type', 'media' ) ) ) {
			$meta_type = 'post';
		} elseif ( 'taxonomy' == $meta_type ) {
			$meta_type = 'term';
		}

		if ( empty( $meta_key ) ) {
			if ( ! defined( 'PODS_ALLOW_FULL_META' ) || ! PODS_ALLOW_FULL_META ) {
				return $_null; // don't cover get_post_meta( $id )
			}

			$single = false;
		}

		if ( 'user' === $object_type && 'locale' === $meta_key ) {
			return $_null; // don't interfere with locale
		}

		$object = $this->get_object( $object_type, $object_id );

		if ( empty( $object_id ) || empty( $object ) ) {
			return $_null;
		}

		$no_conflict = pods_no_conflict_check( $meta_type );

		if ( ! $no_conflict ) {
			pods_no_conflict_on( $meta_type );
		}

		$meta_cache = array();

		if ( ! $single && isset( $GLOBALS['wp_object_cache'] ) && is_object( $GLOBALS['wp_object_cache'] ) ) {
			$meta_cache = wp_cache_get( $object_id, 'pods_' . $meta_type . '_meta' );

			if ( empty( $meta_cache ) ) {
				$meta_cache = wp_cache_get( $object_id, $meta_type . '_meta' );

				if ( empty( $meta_cache ) ) {
					$meta_cache = update_meta_cache( $meta_type, array( $object_id ) );
					$meta_cache = $meta_cache[ $object_id ];
				}
			}
		}

		if ( empty( $meta_cache ) || ! is_array( $meta_cache ) ) {
			$meta_cache = array();
		}

		if ( ! is_object( self::$current_field_pod ) || self::$current_field_pod->pod != $object['name'] ) {
			self::$current_field_pod = pods( $object['name'], $object_id );
		} elseif ( self::$current_field_pod->id() != $object_id ) {
			self::$current_field_pod->fetch( $object_id );
		}

		$pod = self::$current_field_pod;

		$meta_keys = array( $meta_key );

		if ( empty( $meta_key ) ) {
			$meta_keys = array_keys( $meta_cache );
		}

		$key_found = false;

		foreach ( $meta_keys as $meta_k ) {
			if ( ! empty( $pod ) ) {
				if ( isset( $pod->fields[ $meta_k ] ) ) {
					$key_found = true;

					$meta_cache[ $meta_k ] = $pod->field( array(
						'name'     => $meta_k,
						'single'   => $single,
						'get_meta' => true
					) );

					if ( ( ! is_array( $meta_cache[ $meta_k ] ) || ! isset( $meta_cache[ $meta_k ][0] ) ) ) {
						if ( empty( $meta_cache[ $meta_k ] ) && ! is_array( $meta_cache[ $meta_k ] ) && $single ) {
							$meta_cache[ $meta_k ] = array();
						} else {
							$meta_cache[ $meta_k ] = array( $meta_cache[ $meta_k ] );
						}
					}

					if ( in_array( $pod->fields[ $meta_k ]['type'], PodsForm::tableless_field_types() ) && isset( $meta_cache[ '_pods_' . $meta_k ] ) ) {
						unset( $meta_cache[ '_pods_' . $meta_k ] );
					}
				} elseif ( false !== strpos( $meta_k, '.' ) ) {
					$key_found = true;

					$first = current( explode( '.', $meta_k ) );

					if ( isset( $pod->fields[ $first ] ) ) {
						$meta_cache[ $meta_k ] = $pod->field( array(
							'name'     => $meta_k,
							'single'   => $single,
							'get_meta' => true
						) );

						if ( ( ! is_array( $meta_cache[ $meta_k ] ) || ! isset( $meta_cache[ $meta_k ][0] ) ) && $single ) {
							if ( empty( $meta_cache[ $meta_k ] ) && ! is_array( $meta_cache[ $meta_k ] ) && $single ) {
								$meta_cache[ $meta_k ] = array();
							} else {
								$meta_cache[ $meta_k ] = array( $meta_cache[ $meta_k ] );
							}
						}

						if ( in_array( $pod->fields[ $first ]['type'], PodsForm::tableless_field_types() ) && isset( $meta_cache[ '_pods_' . $first ] ) ) {
							unset( $meta_cache[ '_pods_' . $first ] );
						}
					}
				}
			}
		}

		if ( ! $no_conflict ) {
			pods_no_conflict_off( $meta_type );
		}

		unset( $pod ); // memory clear

		if ( ! $key_found ) {
			return $_null;
		}

		if ( ! $single && isset( $GLOBALS['wp_object_cache'] ) && is_object( $GLOBALS['wp_object_cache'] ) ) {
			wp_cache_set( $object_id, $meta_cache, 'pods_' . $meta_type . '_meta' );
		}

		if ( empty( $meta_key ) ) {
			return $meta_cache;
		} elseif ( isset( $meta_cache[ $meta_key ] ) ) {
			$value = $meta_cache[ $meta_key ];
		} else {
			$value = '';
		}

		if ( ! is_numeric( $value ) && empty( $value ) ) {
			if ( $single ) {
				$value = '';
			} else {
				$value = array();
			}
		} // get_metadata requires $meta[ 0 ] to be set for first value to be retrieved
		elseif ( ! is_array( $value ) ) {
			$value = array( $value );
		}

		return $value;
	}
1197266
public function get($name, $options = [], $usePeeringServiceManagers = false)
    {
        if (is_string($options)) {
            $options = ['class_name' => $options];
        }

        return parent::get($name, $options, $usePeeringServiceManagers);
    }
994733
public function get_value( $object_id, $request ) {
		$fields   = $this->get_registered_fields();
		$response = array();

		foreach ( $fields as $name => $args ) {
			$all_values = get_metadata( $this->get_meta_type(), $object_id, $name, false );
			if ( $args['single'] ) {
				if ( empty( $all_values ) ) {
					$value = $args['schema']['default'];
				} else {
					$value = $all_values[0];
				}
				$value = $this->prepare_value_for_response( $value, $request, $args );
			} else {
				$value = array();
				foreach ( $all_values as $row ) {
					$value[] = $this->prepare_value_for_response( $row, $request, $args );
				}
			}

			$response[ $name ] = $value;
		}

		return (object) $response;
	}
1215032
public function loadObject($class_name = "stdClass")
    {
        if ($this->stmt === null) {
            return null;
        }

        return $this->stmt->fetchObject($class_name);
    }
1339406
def object_results(self, object_results):
        
        if _is_iterable_non_string(object_results):
            self._object_results = list(object_results)
        elif object_results is None:
            self._object_results = []
        else:
            self._object_results = [object_results]
395176
public function fetchArray($result_object,$which_connection='')
    {
        if (is_null($result_object)) return false;
        if ($result_object === false) return false;

        if ($which_connection == '') {
            $which_connection = $this->default_db;
        }
        $ret = $result_object->fields;
        if ($result_object) {
            $result_object->MoveNext();
        }

        return $ret;
    }
1277302
public function createObjectSettingsAction($object_id)
    {
        $em = $this->getDoctrine()->getManager();
        $class_name = $this->container->getParameter('acs_settings.setting_class');

        // Get the object fields
        $object = $em->getRepository('ACSACSPanelBundle:Service')->find($object_id);
        $object_fields = $object->getType()->getFieldTypes();

        $user = $this->get('security.context')->getToken()->getUser();

        // Adding one form for each setting field
        foreach($object_fields as $id => $field_config){
            $setting = $em->getRepository('ACSACSPanelBundle:PanelSetting')->findOneBy(
                array(
                    'user' => $user->getId(),
                    'setting_key' => $field_config->getSettingKey(),
                    'focus' => 'object_setting',
                    'service' => $object,
                )
            );

            if (!count($setting)) {
                $setting = new $class_name;
                $setting->setSettingKey($field_config->getSettingKey());
                $setting->setValue($field_config->getDefaultValue());
                $setting->setContext($field_config->getContext());
                $setting->setLabel($field_config->getLabel());
                $setting->setType($field_config->getType());
                $setting->setFocus('object_setting');
                $setting->setService($object);
                $user->addSetting($setting);
                $em->persist($user);
                $em->flush();
            }
        }

        return $this->redirect($this->generateUrl('settings'));
    }
12195
public function getFieldNames($objectName)
    {
        $fieldNames = array();
        $modelConfiguration = $this->getModelConfiguration($objectName);
        if (isset($modelConfiguration['__field_index'])) {
            $fieldNames = array_keys($modelConfiguration['__field_index']);
        }

        return $fieldNames;
    }
13021
public function addContextRelationToObject($object, $context_name = 'default')
    {
        $context = $this->findContext($context_name);

        $object->setContext($context);

        return $object;
    }
248645
public function updateOleObject($objectIndex, $object_data)
    {
        //Build URI
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/oleobjects/' . $objectIndex;
        //Sign URI
        $signedURI = Utils::sign($strURI);
        //Send request and receive response stream
        $responseStream = Utils::processCommand($signedURI, 'POST', 'json', $object_data);
        $json = json_decode($responseStream);
        return $json;

    }
947937
public function get_object_data( $object_params = null ) {

		/**
		 * @var $wpdb wpdb
		 */
		global $wpdb;

		$object_params = array_merge(
			array(
				// The name of the field.
				'name'        => '',
				// The value of the field.
				'value'       => '',
				// Field options.
				'options'     => array(),
				// Pod data.
				'pod'         => '',
				// Item ID.
				'id'          => '',
				// Data context.
				'context'     => '',
				// Data parameters.
				'data_params' => array(
					// Query being searched.
					'query' => '',
				),
				// Page number of results to get.
				'page'        => 1,
				// How many data items to limit to (autocomplete defaults to 30, set to -1 or 1+ to override).
				'limit'       => 0,
			), $object_params
		);

		$object_params['options']     = (array) $object_params['options'];
		$object_params['data_params'] = (array) $object_params['data_params'];

		$name         = $object_params['name'];
		$value        = $object_params['value'];
		$options      = $object_params['options'];
		$pod          = $object_params['pod'];
		$id           = $object_params['id'];
		$context      = $object_params['context'];
		$data_params  = $object_params['data_params'];
		$page         = min( 1, (int) $object_params['page'] );
		$limit        = (int) $object_params['limit'];
		$autocomplete = false;

		if ( isset( $options['options'] ) ) {
			$options = array_merge( $options, $options['options'] );

			unset( $options['options'] );
		}

		$data  = apply_filters( 'pods_field_pick_object_data', null, $name, $value, $options, $pod, $id, $object_params );
		$items = array();

		if ( ! isset( $options[ static::$type . '_object' ] ) ) {
			$data = pods_v( 'data', $options, array(), true );
		}

		$simple = false;

		if ( null === $data ) {
			$data = array();

			if ( 'custom-simple' === $options[ static::$type . '_object' ] ) {
				$custom = pods_v( static::$type . '_custom', $options, '' );

				$custom = apply_filters( 'pods_form_ui_field_pick_custom_values', $custom, $name, $value, $options, $pod, $id, $object_params );

				if ( ! empty( $custom ) ) {
					if ( ! is_array( $custom ) ) {
						$data = array();

						$custom = explode( "\n", trim( $custom ) );

						foreach ( $custom as $custom_value ) {
							$custom_label = explode( '|', $custom_value );

							if ( empty( $custom_label ) ) {
								continue;
							}

							if ( 1 === count( $custom_label ) ) {
								$custom_label = $custom_value;
							} else {
								$custom_value = $custom_label[0];
								$custom_label = $custom_label[1];
							}

							$custom_value = trim( (string) $custom_value );
							$custom_label = trim( (string) $custom_label );

							$data[ $custom_value ] = $custom_label;
						}
					} else {
						$data = $custom;
					}//end if

					$simple = true;
				}//end if
			} elseif ( isset( self::$related_objects[ $options[ static::$type . '_object' ] ] ) && isset( self::$related_objects[ $options[ static::$type . '_object' ] ]['data'] ) && ! empty( self::$related_objects[ $options[ static::$type . '_object' ] ]['data'] ) ) {
				$data = self::$related_objects[ $options[ static::$type . '_object' ] ]['data'];

				$simple = true;
			} elseif ( isset( self::$related_objects[ $options[ static::$type . '_object' ] ] ) && isset( self::$related_objects[ $options[ static::$type . '_object' ] ]['data_callback'] ) && is_callable( self::$related_objects[ $options[ static::$type . '_object' ] ]['data_callback'] ) ) {
				$data = call_user_func_array(
					self::$related_objects[ $options[ static::$type . '_object' ] ]['data_callback'], array(
						$name,
						$value,
						$options,
						$pod,
						$id,
					)
				);

				if ( 'data' === $context ) {
					self::$field_data = array(
						'field'        => $name,
						'id'           => $options['id'],
						'autocomplete' => false,
					);
				}

				$simple = true;

				// Cache data from callback.
				if ( ! empty( $data ) ) {
					self::$related_objects[ $options[ static::$type . '_object' ] ]['data'] = $data;
				}
			} elseif ( 'simple_value' !== $context ) {
				$pick_val = pods_v( static::$type . '_val', $options );

				if ( 'table' === pods_v( static::$type . '_object', $options ) ) {
					$pick_val = pods_v( static::$type . '_table', $options, $pick_val, true );
				}

				if ( '__current__' === $pick_val ) {
					if ( is_object( $pod ) ) {
						$pick_val = $pod->pod;
					} elseif ( is_array( $pod ) ) {
						$pick_val = $pod['name'];
					} elseif ( 0 < strlen( $pod ) ) {
						$pick_val = $pod;
					}
				}

				$options['table_info'] = pods_api()->get_table_info( pods_v( static::$type . '_object', $options ), $pick_val, null, null, $object_params );

				$search_data = pods_data();
				$search_data->table( $options['table_info'] );

				if ( isset( $options['table_info']['pod'] ) && ! empty( $options['table_info']['pod'] ) && isset( $options['table_info']['pod']['name'] ) ) {
					$search_data->pod    = $options['table_info']['pod']['name'];
					$search_data->fields = $options['table_info']['pod']['fields'];
				}

				$params = array(
					'select'     => "`t`.`{$search_data->field_id}`, `t`.`{$search_data->field_index}`",
					'table'      => $search_data->table,
					'where'      => pods_v( static::$type . '_where', $options, (array) $options['table_info']['where_default'], true ),
					'orderby'    => pods_v( static::$type . '_orderby', $options, null, true ),
					'groupby'    => pods_v( static::$type . '_groupby', $options, null, true ),
					'pagination' => false,
					'search'     => false,
				);

				if ( in_array( $options[ static::$type . '_object' ], array( 'site', 'network' ), true ) ) {
					$params['select'] .= ', `t`.`path`';
				}

				if ( ! empty( $params['where'] ) && (array) $options['table_info']['where_default'] !== $params['where'] ) {
					$params['where'] = pods_evaluate_tags( $params['where'], true );
				}

				if ( empty( $params['where'] ) || ( ! is_array( $params['where'] ) && '' === trim( $params['where'] ) ) ) {
					$params['where'] = array();
				} elseif ( ! is_array( $params['where'] ) ) {
					$params['where'] = (array) $params['where'];
				}

				if ( 'value_to_label' === $context ) {
					$params['where'][] = "`t`.`{$search_data->field_id}` = " . number_format( $value, 0, '', '' );
				}

				$display = trim( pods_v( static::$type . '_display', $options ), ' {@}' );

				if ( 0 < strlen( $display ) ) {
					if ( isset( $options['table_info']['pod'] ) && ! empty( $options['table_info']['pod'] ) ) {
						if ( isset( $options['table_info']['pod']['object_fields'] ) && isset( $options['table_info']['pod']['object_fields'][ $display ] ) ) {
							$search_data->field_index = $display;

							$params['select'] = "`t`.`{$search_data->field_id}`, `t`.`{$search_data->field_index}`";
						} else {
							$search_data->field_index = sanitize_key( $display );

							if ( isset( $options['table_info']['pod']['fields'][ $display ] ) && 'table' === $options['table_info']['pod']['storage'] && ! in_array(
								$options['table_info']['pod']['type'], array(
									'pod',
									'table',
								), true
							)
							) {
								$params['select'] = "`t`.`{$search_data->field_id}`, `d`.`{$search_data->field_index}`";
							} elseif ( 'meta' === $options['table_info']['pod']['storage'] ) {
								$params['select'] = "`t`.`{$search_data->field_id}`, `{$search_data->field_index}`.`meta_value` AS {$search_data->field_index}";
							} else {
								$params['select'] = "`t`.`{$search_data->field_id}`, `t`.`{$search_data->field_index}`";
							}
						}//end if
					} elseif ( isset( $options['table_info']['object_fields'] ) && isset( $options['table_info']['object_fields'][ $display ] ) ) {
						$search_data->field_index = $display;

						$params['select'] = "`t`.`{$search_data->field_id}`, `t`.`{$search_data->field_index}`";
					}//end if
				}//end if

				$autocomplete = $this->is_autocomplete( $options );

				$hierarchy = false;

				if ( 'data' === $context && ! $autocomplete ) {
					if ( 'single' === pods_v( static::$type . '_format_type', $options, 'single' ) && in_array(
						pods_v( static::$type . '_format_single', $options, 'dropdown' ), array(
							'dropdown',
							'radio',
						), true
					)
					) {
						$hierarchy = true;
					} elseif ( 'multi' === pods_v( static::$type . '_format_type', $options, 'single' ) && in_array(
						pods_v( static::$type . '_format_multi', $options, 'checkbox' ), array(
							'multiselect',
							'checkbox',
						), true
					)
					) {
						$hierarchy = true;
					}
				}

				if ( $hierarchy && $options['table_info']['object_hierarchical'] && ! empty( $options['table_info']['field_parent'] ) ) {
					$params['select'] .= ', ' . $options['table_info']['field_parent_select'];
				}

				if ( $autocomplete ) {
					if ( 0 === $limit ) {
						$limit = 30;
					}

					$params['limit'] = apply_filters( 'pods_form_ui_field_pick_autocomplete_limit', $limit, $name, $value, $options, $pod, $id, $object_params );

					if ( is_array( $value ) && $params['limit'] < count( $value ) ) {
						$params['limit'] = count( $value );
					}

					$params['page'] = $page;

					if ( 'admin_ajax_relationship' === $context ) {
						$lookup_where = array(
							$search_data->field_index => "`t`.`{$search_data->field_index}` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'",
						);

						// @todo Hook into WPML for each table
						if ( $wpdb->users === $search_data->table ) {
							$lookup_where['display_name'] = "`t`.`display_name` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
							$lookup_where['user_login']   = "`t`.`user_login` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
							$lookup_where['user_email']   = "`t`.`user_email` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
						} elseif ( $wpdb->posts === $search_data->table ) {
							$lookup_where['post_title']   = "`t`.`post_title` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
							$lookup_where['post_name']    = "`t`.`post_name` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
							$lookup_where['post_content'] = "`t`.`post_content` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
							$lookup_where['post_excerpt'] = "`t`.`post_excerpt` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
						} elseif ( $wpdb->terms === $search_data->table ) {
							$lookup_where['name'] = "`t`.`name` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
							$lookup_where['slug'] = "`t`.`slug` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
						} elseif ( $wpdb->comments === $search_data->table ) {
							$lookup_where['comment_content']      = "`t`.`comment_content` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
							$lookup_where['comment_author']       = "`t`.`comment_author` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
							$lookup_where['comment_author_email'] = "`t`.`comment_author_email` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%'";
						}

						$lookup_where = apply_filters( 'pods_form_ui_field_pick_autocomplete_lookup', $lookup_where, $data_params['query'], $name, $value, $options, $pod, $id, $object_params, $search_data );

						if ( ! empty( $lookup_where ) ) {
							$params['where'][] = implode( ' OR ', $lookup_where );
						}

						$orderby   = array();
						$orderby[] = "(`t`.`{$search_data->field_index}` LIKE '%" . pods_sanitize_like( $data_params['query'] ) . "%' ) DESC";

						$pick_orderby = pods_v( static::$type . '_orderby', $options, null, true );

						if ( 0 < strlen( $pick_orderby ) ) {
							$orderby[] = $pick_orderby;
						}

						$orderby[] = "`t`.`{$search_data->field_index}`";
						$orderby[] = "`t`.`{$search_data->field_id}`";

						$params['orderby'] = $orderby;
					}//end if
				} elseif ( 0 < $limit ) {
					$params['limit'] = $limit;
					$params['page']  = $page;
				}//end if

				$extra = '';

				if ( $wpdb->posts === $search_data->table ) {
					$extra = ', `t`.`post_type`';
				} elseif ( $wpdb->terms === $search_data->table ) {
					$extra = ', `tt`.`taxonomy`';
				} elseif ( $wpdb->comments === $search_data->table ) {
					$extra = ', `t`.`comment_type`';
				}

				$params['select'] .= $extra;

				if ( 'user' === pods_v( static::$type . '_object', $options ) ) {
					$roles = pods_v( static::$type . '_user_role', $options );

					if ( ! empty( $roles ) ) {
						$where = array();

						foreach ( (array) $roles as $role ) {
							if ( empty( $role ) || ( pods_clean_name( $role ) !== $role && sanitize_title( $role ) !== $role ) ) {
								continue;
							}

							$prefix = $wpdb->base_prefix;

							if ( is_multisite() && ! is_main_site() ) {
								$prefix .= get_current_blog_id() . '_';
							}

							$where[] = $prefix . 'capabilities.meta_value LIKE "%\"' . pods_sanitize_like( $role ) . '\"%"';
						}

						if ( ! empty( $where ) ) {
							$params['where'][] = implode( ' OR ', $where );
						}
					}//end if
				}//end if

				$results = $search_data->select( $params );

				if ( $autocomplete && $params['limit'] < $search_data->total_found() ) {
					if ( ! empty( $value ) ) {
						$ids = $value;

						if ( is_array( $ids ) && isset( $ids[0] ) && is_array( $ids[0] ) ) {
							$ids = wp_list_pluck( $ids, $search_data->field_id );
						}

						if ( is_array( $ids ) ) {
							$ids = implode( ', ', $ids );
						}

						if ( is_array( $params['where'] ) ) {
							$params['where'] = implode( ' AND ', $params['where'] );
						}
						if ( ! empty( $params['where'] ) ) {
							$params['where'] .= ' AND ';
						}

						$params['where'] .= "`t`.`{$search_data->field_id}` IN ( {$ids} )";

						$results = $search_data->select( $params );
					}//end if
				} else {
					$autocomplete = false;
				}//end if

				if ( 'data' === $context ) {
					self::$field_data = array(
						'field'        => $name,
						'id'           => $options['id'],
						'autocomplete' => $autocomplete,
					);
				}

				if ( $hierarchy && ! $autocomplete && ! empty( $results ) && $options['table_info']['object_hierarchical'] && ! empty( $options['table_info']['field_parent'] ) ) {
					$select_args = array(
						'id'     => $options['table_info']['field_id'],
						'index'  => $options['table_info']['field_index'],
						'parent' => $options['table_info']['field_parent'],
					);

					$results = pods_hierarchical_select( $results, $select_args );
				}

				$ids = array();

				if ( ! empty( $results ) ) {
					$display_filter = pods_v( 'display_filter', pods_v( 'options', pods_v( $search_data->field_index, $search_data->pod_data['object_fields'] ) ) );

					foreach ( $results as $result ) {
						$result = get_object_vars( $result );

						if ( ! isset( $result[ $search_data->field_id ], $result[ $search_data->field_index ] ) ) {
							continue;
						}

						$result[ $search_data->field_index ] = trim( $result[ $search_data->field_index ] );

						$object      = '';
						$object_type = '';

						if ( $wpdb->posts === $search_data->table && isset( $result['post_type'] ) ) {
							$object      = $result['post_type'];
							$object_type = 'post_type';
						} elseif ( $wpdb->terms === $search_data->table && isset( $result['taxonomy'] ) ) {
							$object      = $result['taxonomy'];
							$object_type = 'taxonomy';
						}

						if ( 0 < strlen( $display_filter ) ) {
							$display_filter_args = pods_v( 'display_filter_args', pods_v( 'options', pods_v( $search_data->field_index, $search_data->pod_data['object_fields'] ) ) );

							$filter_args = array(
								$display_filter,
								$result[ $search_data->field_index ],
							);

							if ( ! empty( $display_filter_args ) ) {
								foreach ( (array) $display_filter_args as $display_filter_arg ) {
									if ( isset( $result[ $display_filter_arg ] ) ) {
										$filter_args[] = $result[ $display_filter_arg ];
									}
								}
							}

							$result[ $search_data->field_index ] = call_user_func_array( 'apply_filters', $filter_args );
						}

						if ( in_array( $options[ static::$type . '_object' ], array( 'site', 'network' ), true ) ) {
							$result[ $search_data->field_index ] = $result[ $search_data->field_index ] . $result['path'];
						} elseif ( '' === $result[ $search_data->field_index ] ) {
							$result[ $search_data->field_index ] = '(No Title)';
						}

						if ( 'admin_ajax_relationship' === $context ) {
							$items[] = $this->build_dfv_field_item_data_recurse_item( $result[ $search_data->field_id ], $result[ $search_data->field_index ], (object) $object_params );
						} else {
							$data[ $result[ $search_data->field_id ] ] = $result[ $search_data->field_index ];
						}

						$ids[] = $result[ $search_data->field_id ];
					}//end foreach
				}//end if
			}//end if

			if ( $simple && 'admin_ajax_relationship' === $context ) {
				$found_data = array();

				foreach ( $data as $k => $v ) {
					if ( false !== stripos( $v, $data_params['query'] ) || false !== stripos( $k, $data_params['query'] ) ) {
						$found_data[ $k ] = $v;
					}
				}

				$data = $found_data;
			}
		}//end if

		if ( 'admin_ajax_relationship' === $context ) {
			if ( empty( $items ) && ! empty( $data ) ) {
				foreach ( $data as $k => $v ) {
					$items[] = array(
						'id'   => $k,
						'text' => $v,
					);
				}
			}

			$data = $items;
		}

		return $data;

	}
174485
protected function check_object_id( $object_id ) {
		$fetcher = new PostFetcher();
		$post    = $fetcher->get_check( $object_id );
		return $post->ID;
	}
825649
protected function get_global_params( $root_command = false ) {
		$binding                 = array();
		$binding['root_command'] = $root_command;

		if ( ! $this->can_have_subcommands() || ( is_object( $this->parent ) && get_class( $this->parent ) === 'WP_CLI\Dispatcher\CompositeCommand' ) ) {
			$binding['is_subcommand'] = true;
		}

		foreach ( \WP_CLI::get_configurator()->get_spec() as $key => $details ) {
			if ( false === $details['runtime'] ) {
				continue;
			}

			if ( isset( $details['deprecated'] ) ) {
				continue;
			}

			if ( isset( $details['hidden'] ) ) {
				continue;
			}

			if ( true === $details['runtime'] ) {
				$synopsis = "--[no-]$key";
			} else {
				$synopsis = "--$key" . $details['runtime'];
			}

			$binding['parameters'][] = array(
				'synopsis' => $synopsis,
				'desc'     => $details['desc'],
			);
		}

		if ( $this->get_subcommands() ) {
			$binding['has_subcommands'] = true;
		}

		return Utils\mustache_render( 'man-params.mustache', $binding );
	}
1205146
static function objects($object, $params = array())
	{
		$result = array();
		$objs = array();

		$links = bors_link::links($object, $params);

//		print_dd($links);
//		echo bors_debug::trace();

		foreach($links as $link)
			$objs[$link->target_class_id()][$link->target_object_id()] = true;

		foreach($objs as $class_id => $ids)
			bors_find_all($class_id, array('id IN' => array_keys($ids)));

		foreach($links as $link)
		{
			if(!($x = $link->target()))
			{
				if(\B2\Cfg::get('bors_link.lost_auto_delete'))
					$link->delete();

				continue;
			}

			$x->_set_arg('is_special', $link->type_id() == 3);
			$x->set_link_type_abs_id($link->type_id(), false);

			if($link->owner_id() < 0)
				$x->set_link_type_id(-$link->type_id(), false);
			else
				$x->set_link_type_id($link->type_id(), false);

			$x->set_bors_link($link, false);

			$result[$x->id()] = $x;
		}

		return $result;
	}