Retrieve input by key or all input as array.

@param null $key
@param null $default
@return array|mixed|null
764575
public function input($key = null, $default = null)
    {
        if ($key === null) {
            return $this->input;
        }

        return array_key_exists($key, $this->input) ? $this->input[$key] : $default;
    }
582686
public static function arrayGet(array $array, $key, $default = null)
    {
        if (isset($array[$key])) {
            return $array[$key];
        }

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

            $array = $array[$segment];
        }

        return $array;
    }
217150
public function get(string $key,string $default=null)
  {
    $keys = explode('.',$key);
    $val = $this->confValues;

    for ($i=0; $i<count($keys); $i++) {
      $val = ( $val[ $keys[$i] ] ?? null);
      if (is_null($val)) break;
    }

    return $val ?? $default;
  }
1282851
public function input($key, $default = false)
    {
        $this->populateInput();

        if (isset($this->input[$key])) {
            return $this->input[$key];
        }

        return $default;
    }
540769
public function getOldInput( $key = null, $default = null )
	{
		$input = $this->get( '_old_input', [] );

		// Input that is flashed to the session can be easily retrieved by the
		// developer, making repopulating old forms and the like much more
		// convenient, since the request's previous input is available.
		return Arr::get( $input, $key, $default );
	}
584859
public function get(string $key, $default = null)
    {
        if (array_key_exists($key, $this->input)) {
            return $this->input[$key];
        } elseif (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }

        // No dot, then not nested keys. We already tried that key and were not lucky.
        if (false === strpos($key, '.')) {
            return $this->default($default);
        }

        try {
            $return = $this->find($this->input, $key);
        } catch (\Exception $e) {
            $return = $this->default($default);
        }
        return $return;
    }
480570
public function getArray($key, array $default = array())
    {
        $value = $this->get($key, null);

        return null !== $value ? (array) $value : (array) $default;
    }
711868
public function get($key = null, $default = null)
    {
        $this->start();

        if ($key) {
            return Arr::get($_SESSION, $key, $default);
        } else {
            return $this->getAll();
        }
    }
105216
static public function get($key = null, $default = null) {
        if (is_null($key)) return json_decode(json_encode(self::$_config));
        
        $config = &self::$_config;
        
        return Utils::arrayGet($config, $key, $default);
    }
329139
public function input( $key = null, $default = null ) {
		return data_get(
			$this->get_input_source()->all() + $this->query->all(), $key, $default
		);
	}
211327
public function getParam(string $key, $default = null)
    {
        if (isset($this->post[$key])) {
            return $this->post[$key];
        }
        if (isset($this->get[$key])) {
            return $this->get[$key];
        }
        return $default;
    }
1278076
public function get($key, $default = null)
    {
        list($baseKey, $searchKey) = $this->fetchKey($key);

        $value = $this->fetchValue($baseKey, $searchKey);

        return (! is_null($value)) ? $value : $default;
    }
699367
public function get($key, $default = null)
    {
        $array = $this->objects;

        if (isset($array[$key])) {
            return $array[$key];
        }
        foreach (explode('\\', $key) as $segment) {
            if (!is_array($array) || !array_key_exists($segment, $array)) {
                return $default;
            }
            $array = $array[$segment];
        }
        return $array;
    }
873666
public function get($key = null, $default = null)
	{
		$return = $this->data;

		if ($key !== null) {
			$keys = explode('.', $key);

			foreach ($keys as $key) {
				if (isset($return[(string) $key])) {
					$return = $return[$key];
				} else {
					$return = $default;
					break;
				}
			}
		}

		return $return;
	}
1181280
public static function get($array, $key, $default = null) {
        $keys = explode(".", $key);
        $level = &$array;
        $length = count($keys);
        foreach($keys as $index => $key) {
            if (!is_array($level)) {
              return null;
            }

            if(array_key_exists($key, $level)) {
                if($index == $length-1) {
                    return $level[$key];
                } else {
                    $level = &$level[$key];
                }
            } else {
                return $default;
            }
        }
        return $default;
    }
44819
public function getArray($key, array $default = [])
	{
		$key = strtolower($key);
		
		if(array_key_exists($key, $this->data))
		{
			if(is_array($this->data[$key]))
			{
				return array_values($this->data[$key]);
			}
				
			return (array)$this->data[$key];
		}
		
		return $default;
	}
278116
public static function get($key, $default = null)
    {
        return isset(self::$variables[$key]) ? self::$variables[$key] : $default;
    }