@param array  $params
@param string $key
@param null   $default

@return array|null
976055
public static function getArray(
        array $params,
        string $key,
        $default = null
    ) {
        if (self::has($params, $key)) {
            return (array)$params[$key];
        }

        return $default;
    }
683358
public function getQueryParam(string $key, $default = null)
    {
        $getParams = $this->getQueryParams();
        $result = $default;
        if (isset($getParams[$key])) {
            $result = $getParams[$key];
        }

        return $result;
    }
538182
public function getParam($key, $default = null)
    {
        $params = $this->params;
        if (is_array($params) && isset($params[$key])) {
            $result = $params[$key];
        } else {
            if (!is_string($default) && is_callable($default)) {
                $result = $default();
            } else {
                $result = $default;
            }
        }

        return $result;
    }
436284
public function get($key, $default = null)
    {
        if (array_key_exists($key, $this->params)) {
            return $this->params[$key];
        }

        return $default;
    }
263093
protected function params(Request $request, array $params, $default = null)
    {
        $data = [];
        foreach ($params as $param) {
            $data[$param] = $request->getParam($param, $default);
        }

        return $data;
    }
1307760
public function getParam($key, $default = null)
    {
        if (isset($this->parameters[$key])) {
            return $this->parameters[$key];
        }

        return $default;
    }
906317
public static function param($key, $default = null)
    {
        if (!$key || !\is_string($key)) {
            return false;
        }

        $ret = $_POST[$key] ?? $_GET[$key] ?? $default;

        if (\is_string($ret)) {
            return stripslashes(urldecode(preg_replace('/((\%5C0+)|(\%00+))/i', '', urlencode($ret))));
        }

        return $ret;
    }
521949
public static function get($array, $key, $default = null)
    {
        if (!is_array($array) and !$array instanceof ArrayAccess) {
            throw new InvalidArgumentException('First parameter must be an array or ArrayAccess object.');
        }
        if (is_null($key)) {
            return $array;
        }
        if (is_array($key)) {
            $return = [];
            foreach ($key as $k) {
                $return[$k] = static::get($array, $k, $default);
            }
            return $return;
        }

        is_object($key) and $key = (string) $key;

        if (array_key_exists($key, $array)) {
            return $array[$key];
        }
        foreach (explode('.', $key) as $keyPart) {
            if (($array instanceof ArrayAccess and isset($array[$keyPart])) === false) {
                if (!is_array($array) or !array_key_exists($keyPart, $array)) {
                    return ($default instanceof Closure) ? $default() : $default;
                }
            }
            $array = $array[$keyPart];
        }
        return $array;
    }
1197314
public static function getAndRemove(
        array &$params,
        string $key,
        $default = null
    ) {
        $value = self::get(
            $params,
            $key,
            $default
        );

        self::remove(
            $params,
            $key
        );

        return $value;
    }
1349250
public function getParam($key, $default = null)
        {
            $key = (string) $key;
            if (isset($this->_params[$key])) {
                return $this->_params[$key];
            }

            return $default;
        }
1035496
public function get($key = null, $default = null)
    {
        if (!empty($key)) {
            return ArrayFunc::get($this->config, $key, $default);
        }

        return $this->config;
    }
465173
public static function getInstance($key = 'default', array $params = []) {
        $class = get_called_class();

        if (isset(static::$_instances[$class][$key])) {
            return static::$_instances[$class][$key];
        }

        $reflection = new ReflectionClass($class);
        $object = $reflection->newInstanceArgs($params);

        static::$_instances[$class][$key] = $object;

        return $object;
    }
823633
public static function getArray(
        array $options,
        string $key,
        $default = null
    ) {
        if (array_key_exists($key, $options)) {
            return (array)$options[$key];
        }

        return $default;
    }
452186
public static function findKey($params, $arg, $default = null)
    {
        if (is_object($params) === true)
        {
            $params = (array)$params;
        }

        if (isset($params[$arg]) === true)
        {
            $val = $params[$arg];
            unset($params[$arg]);

            return $val;
        } else
        {
            return $default;
        }
    }
675455
public static function getHostParam($key, $default = null)
  {
    return (array_key_exists($key, $_SERVER) && !empty($_SERVER[$key])) ? $_SERVER[$key] : $default;
  }
132488
public function get($key, $default = null): array
    {
        if (!$this->has($key)) {
            if (\is_array($default)) {
                return $default;
            }

            return $default === null ? [] : [$default];
        }

        return $this->headers[Helpers::normalizeHeaderName($key)];
    }
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;
  }