Get an item from an array with dot notation support.

@param array $array
@param mixed $key
@param mixed $default

@return mixed
171384
public static function get(array $array, $key = null, $default = null)
    {
        if (is_null($key)) {
            return;
        }

        if (isset($array[$key])) {
            return $array[$key];
        }

        foreach (explode('.', $key) as $token) {
            if (! is_array($array) or ! array_key_exists($token, $array)) {
                return $default;
            }

            $array = $array[$token];
        }

        return $array;
    }
229772
public static function getFloat(array $array, $key, float $default = 0.0) : float
    {
        $key = (string) $key;

        if ($array[$key] ?? 0) {
            return (float) $array[$key];
        }

        return $default;
    }
876480
public function get($key, $default = null)
    {
        $data = DotArray::get($this->getStorage(), $key);

        return $data === null ? $default : $data;
    }
1056777
public static function get($array, string $key, $default = null)
    {
        if (! Assert::array($array)) {
            return $default;
        }

        $key = trim($key);

        if ($key === '') {
            return $array;
        }

        if (static::exists($array, $key)) {
            return $array[$key];
        }

        foreach (explode('.', $key) as $segment) {
            if (Assert::array($array) && static::exists($array, $segment)) {
                $array = $array[$segment];
            } else {
                return $default;
            }
        }

        return $array;
    }
792772
public static function get(array $array, $key, $default = null)
    {
        if (strpos($key, '.') !== false) {
            $keys = explode('.', $key);
            $topKey = array_shift($keys);

            return (isset($array[$topKey])) ? static::get($array[$topKey], implode('.', $keys), $default) : $default;
        } else {
            return (isset($array[$key])) ? $array[$key] : $default;
        }
    }
140882
public function get($key, $default = null)
    {
        $keys = explode('.', $key);
        $value = $default;
        foreach ( $keys as $i => $_key ) {
            if ( ! $i && isset($this->_params[$_key]) ) {
                $value = $this->_params[$_key];
            } elseif ( is_array($value) && isset($value[$_key]) ) {
                $value = $value[$_key];
            } else {
                $value = $default;
                break;
            }
        }
        return $value;
    }
632177
public static function get( $array, $key, $default = NULL )
    {
        if ( is_null( $key ) ) return $array;

        if ( isset( $array[ $key ] ) ) return $array[ $key ];

        foreach ( explode( '.', $key ) as $segment )
        {
            if ( !is_array( $array ) || !array_key_exists( $segment, $array ) )
            {
                return Util::value( $default );
            }

            $array = $array[ $segment ];
        }

        return $array;
    }
68814
public function get($key = null, $default = null)
    {
        if (!func_num_args()) {
            return $this->collection->all();
        }

        return $this->fetchFromArray($key, $default);
    }
532348
protected function get(array $array, $key)
    {
        if (isset($array[$key])) {
            return $array[$key];
        }

        foreach (explode(".", $key) as $part) {
            if (!is_array($array) or !isset($array[$part])) {
                return null;
            }

            $array = $array[$part];
        }

        return $array;
    }
51810
public static function first( $array, $callback, $default = NULL )
    {
        foreach ( $array as $key => $value )
        {
            if ( call_user_func( $callback, $key, $value ) ) return $value;
        }

        return Util::value( $default );
    }
688623
public static function get(array $data, $key, $default = null)
	{
		if ($key === null) {
			return $data;
		}

		if (is_array($key)) {
			return static::getArray($data, $key, $default);
		}

		foreach (explode('.', $key) as $segment) {
			if (!is_array($data)) {
				return $default;
			}

			if (!array_key_exists($segment, $data)) {
				return $default;
			}

			$data = $data[$segment];
		}

		return $data;
	}
437725
public function get($key, $default = null)
	{
		if(array_key_exists($key, $this->items))
		{
			return $this->items[$key];
		}

		return $default;
	}
296045
public function get($key, $default = null)
    {
        $value = parent::get($key, $default);
        if (is_array($value)) {
            $value = array_shift($value);
        }
        return $value;
    }
172342
public function get($key, $default = null)
    {
        if (
            ($value = $this->call('get', [$key, static::NOT_FOUND])) ===
            static::NOT_FOUND
        ) {
            $value = Arr::get($this->items, $key, $default);

            if (is_array($value)) {
                $value = $this->__wrap($value);
            }
        }

        return $value;
    }
718822
public static function get($key, $default = null)
    {
        if (is_null($key)) {
            return $default;
        }

        return (isset($_GET[$key]) ? $_GET[$key] : $default);
    }
1002733
public function get($key, $default = null)
    {
        $result = ArrayUtility::dotRead($this->data, $this->getNormalizedKey($key));
        if ($result === null) {
            return $default;
        }

        return $this->box($this->getRaw($key, $default));
    }
1191853
public function get($key, $default = null)
    {
        return ArrayHelper::get($this->getItems(), $key, $default, $useDotSyntax = true);
    }