Get field name by index
@param int $i
@param mixed $default
@return mixed
431048
public function &getAt($i, $default=null)
    {
        $field = $this->getNameAt($i);
        if($this->exists($field))
        {
            return $this->get($field);
        }
        return $default;
    }
1291590
public function getOption($field, $default = null)
    {
        return isset($this->options[$field]) ? $this->options[$field] : $default;
    }
280193
public int getField(int index, int defaultValue)
	{
		if (index >= 0 && index < this.version.length)
		{
			return version[index];
		}
		else
		{
			return defaultValue;
		}
	}
30784
final protected function getCollection($id, $default = null)
    {
        if ($id instanceof CollectionInterface) {
            return $id;
        }

        if (is_numeric($id)) {
            return $this->collectionManager->find($id);
        }

        if ($default instanceof CollectionInterface) {
            return $default;
        }

        return null;
    }
1216182
public function get($attribute, $default = null)
    {
        list($relationArray, $column, $jsonArray) = FieldNameSlicer::split($attribute);
        $key = join('.', array_merge($relationArray, [$column]));
        $value = data_get($this->data, $key);

        if ($jsonArray) {
            $value = is_string($value) ? json_decode($value) : $value;

            return data_get($value, join('.', $jsonArray), $default);
        }

        return is_null($value) ? $default : $value;
    }
1252745
public function getSingle($identifier, $default = null)
    {
        $get = $this->get($identifier, $default);
        if (is_array($get)) {
            return array_values($this->identifiers[$identifier])[0];
        }

        return $get;
    }
1169752
public function getString(string $index, $default = null, array $options = []) : ?string
    {
        return $this->getCastedValue('string', $index, $default, $options);
    }
672094
protected function _get($offset, $default = null) {
        $get = isset($this->_req->get) ? $this->_req->get : array();
        return isset($get[$offset]) ? $get[$offset] : $default;
    }
523956
public function hget($key, $field, $default=null) {

        $set = $this->get($key, array());

        return isset($set[$field]) ? $set[$field]:$default;
    }
1163031
public function getValueFromRequest($field, $default = false)
  {
    if (!$element = $this->field($field)) {
      return $default;
    }

    $req = $this->getRequest();
    $input_name = $element->getInputName();

    return $element instanceof Element\File
      ? $req->files->get($input_name, $default, true)
      : $req->get($input_name, $default, true);
  }
300158
public function getNameById($id, $default = null)
    {
        $keyMap = $this->getHandler()->getKeyMap();
        if (empty($keyMap)) {
            return $default;
        }
        foreach ($keyMap as $name => $value) {
            if (isset($value['id']) && $value['id'] == $id) {
                return $name;
            }
        }
        return $default;
    }
342255
public function get($index, $defaultValue = null, $filtered = true)
    {
        if ($this->data->offsetExists($index)) {

            if ($filtered === true) {
                // pretty high-level filtering here...
                return self::filter($this->data->offsetGet($index));
            }

            return $this->data->offsetGet($index);
        }

        return $defaultValue;
    }
151617
public function get($index, $defaultValue = null)
    {
        $index = (string) $index;

        $items = $this->getItems();

        return isset($items[$index]) ? $items[$index] : $defaultValue;
    }
396315
protected static function restGetFieldsDepth($default = 1)
    {
        $depth = Request::getInstance()->query('_fieldsDepth', false);
        if (!$depth) {
            $fields = static::restGetFields(false);
            if (!$fields) {
                return $default;
            }

            // Determine the deepest key
            $depth = 1;
            foreach (explode(',', $fields) as $key) {
                $keyDepth = substr_count($key, '.');
                if ($depth < $keyDepth) {
                    $depth = $keyDepth;
                }
            }
            return $depth;
        }

        return $depth;

    }
1063801
public function segment($index, $default = null)
	{
		$segments = explode('/', trim($this->getPathInfo(), '/'));

		$segments = array_filter($segments, function($v) { return $v != ''; });

		return array_get($segments, $index - 1, $default);
	}
839857
final protected function getTag($id, $default = null)
    {
        if ($id instanceof TagInterface) {
            return $id;
        }

        if (is_numeric($id)) {
            return $this->tagManager->find($id);
        }

        if ($default instanceof TagInterface) {
            return $default;
        }

        return null;
    }
106122
public function getData($field=null,$default=null){
        if(is_null($field)){
            return $this->data;
        }
        $tmp=$this->data;
        foreach(explode(".",$field) as $f){
            if(!isset($tmp[$f])){
                return $default;
            }
            $tmp=$tmp[$f];
        }
        return $tmp;
    }