Get one value or all values

@param string $key Name of the field to get.
@return mixed|array
@throws FieldNotFoundException

Get the value of field $key or all data values if $key is null.
322573
public function getValue($key = null) {
		if( empty($key) ) {
			return $this->data;
		}
		if( !array_key_exists($key, $this->data) ) {
			throw new FieldNotFoundException($key, static::getClass());
		}
		return $this->data[$key];
	}
1164325
public function getBooleanValue($key)
    {
        $value = $this->get($key);
        if ($value === null) {
            return null;
        }
        return ($value === true or $value === 1);
    }
357501
private function getNestedValueByKey($key)
    {
        if (isset($this->nestedKeyCache[$key])) {
            return $this->nestedKeyCache[$key];
        }

        // Check to see if this is targeting an instance of ArrayContainer and grab it from the nested container
        $keyParts = explode('.', $key);
        if ($this->get($keyParts[0]) instanceof self && $arrayContainer = $this->get($keyParts[0])) {
            array_shift($keyParts);
            /* @var ArrayContainer $arrayContainer */
            $value = $arrayContainer->get(implode('.', $keyParts));
        } else {
            $value = $this->items;
            foreach (explode('.', $key) as $keyPart) {
                if ((! is_array($value) || ! $value instanceof self)) {
                    if (is_object($value) && method_exists($value, 'arrayAccessByKey')) {
                        if ($value = $value->arrayAccessByKey($keyPart)) {
                            break;
                        } else {
                            return null;
                        }
                    }
                }

                if (! isset($value[$keyPart])) {
                    return null;
                }

                if (is_array($value[$keyPart]) && ! array_key_exists($keyPart, $value)) {
                    return null;
                }
                $value = $value[$keyPart];
            }
        }

        $this->nestedKeyCache[$key] = $value;

        return $value;
    }
924205
public static function get($key)
    {
        exception_if(!array_has(self::$words, $key), LanguageKeyNotFoundException::class, $key);

        return array_get(self::$words, $key);
    }
604231
public function get($key)
        {
            if (Arrays::is($key)) {
                $result = [];

                foreach($key as $column) {
                    $result[$column] = isset($this->_data[$column]) ? $this->_data[$column] : null;
                }

                return $result;
            } else {
                return isset($this->_data[$key]) ? $this->_data[$key] : null;
            }
        }
394796
protected function getField($key)
    {
        return !empty($this->response[$key]) ? $this->response[$key] : null;
    }
1168575
protected function fieldValue(string $key)
    {
        return $this->isBatched()
            ? Arr::get($this->operations, $this->batchIndex.'.'.$key)
            : $this->operations[$key] ?? null;
    }
698821
protected function &getAttributeValue(string $key)
    {
        if (isset($this->attributes[$key])) {

            return $this->attributes[ $key ];
        }

        $null = null;

        return $null;
    }
452605
static function findValue(string $key)
    {
        return self::hasKey($key)
            ? self::$keyToValueMap[static::class][$key]
            : null;
    }
813010
function &get($key) {
		if ($key=='_id')
			return $this->_id;
		elseif (array_key_exists($key,$this->fields))
			return $this->fields[$key]['value'];
		elseif (array_key_exists($key,$this->adhoc))
			return $this->adhoc[$key]['value'];
		elseif (array_key_exists($key,$this->props))
			return $this->props[$key];
		user_error(sprintf(self::E_Field,$key),E_USER_ERROR);
	}
750948
public function &offsetGet($key) {
        for($i = 0; $i < count($this->arrays); ++$i) {
            if(Util::exists($this->arrays[$i], $key)) {
                return $this->arrays[$i][$key];
            }
        }
        throw new KeyNotFoundException($key);
    }
1208400
public function getValue($key)
    {
        return array_key_exists($key, $this->data)
            ? $this->data[$key]
            : null;
    }
1031909
public static function get($key)
    {
        $noInitModel = static::buildNoInitModel();
        $model = static::find()->where([$noInitModel->idAttribute => $key])->one();
        if ($model) {
            return $model->value;
        }
        return null;
    }
611243
public function get($key)
    {
        $getResult = $this->getValue($key);
        $unserialized = @unserialize($getResult);

        if (Util::hasInternalExpireTime($unserialized)) {
            $getResult = $unserialized['v'];
        }

        return $getResult;
    }
732288
public function get($key)
    {
        if (!$this->offsetExists($key)) {
            throw new UnexpectedValueException(sprintf('Unknown key %s.', $key));
        }

        return $this->offsetGet($key);
    }
1334829
public function offsetGet($key) {
		$key = strtolower($key);
		return isset($this->data[$key]) ? $this->data[$key] : null;
	}
1123432
public function get($key) {
        $value = $this->_data[$key] ?? null;

        if ($value instanceof \Closure) {
            $value = $value();
            $this->set($key, $value);
        }
        return $value;
    }