Retrieve a server variable from the request

@param null|string $key
@param null|mixed  $default
@return array|string|mixed
325008
public function server(string $key = null, $default = null)
    {
        if (is_null($key)) {
            return $this->getServerParams();
        }
        return $this->getServerParams()[$key] ?? $default;
    }
292216
public function get($key, $default = null)
    {
        if(isset($this->data[$key]))
        {
            return $this->data[$key];
        }
        
        return isset($this->session[$key]) ? $this->session[$key] : $default;
    }
938362
public function getRequestData($key = null, $default = null)
    {
        if (!is_null($key)) {
            if (isset($this->requestData[$key])) {
                return $this->requestData[$key];
            } else {
                return $default;
            }
        } else {
            return $this->requestData;
        }
    }
1151147
public function getRequestParam(string $key, $default = null)
  {
    return $this->getQueryParam($key)   ?: 
           $this->getBodyParam($key)    ?: 
           $this->getUploadedFile($key) ?: $default;
  }
1005232
public function get($key = null, $default = null)
	{
		if ( is_null($key) )
		{
			return $this->get;
		}

		return Arr::get($this->get, $key, $default);
	}
942844
public function getParam($key = null, $default = null)
    {
        if (null === $key) {
            return $_GET;
        }
        return (isset($_GET[$key])) ? $_GET[$key] : $default;
    }
296045
public function get($key, $default = null)
    {
        $value = parent::get($key, $default);
        if (is_array($value)) {
            $value = array_shift($value);
        }
        return $value;
    }
1275693
public static function getSessParam($key, $default = null)
  {
    return (array_key_exists($key, $_SESSION) && !empty($_SESSION[$key])) ? $_SESSION[$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;
    }
1061446
public function get($key = null, $default = null)
    {
        if ($this->has($key)) {
            return $this->getValueAtKey($key, $this->payload());
        }
        return $default;
    }
658272
public function get(string $key, $default = null)
    {
        return ($value = $this->offsetGet($key)) === null ? $default : $value;
    }
454857
public static function get( $key, $default = null ) 
	{
		if ( !isset( CCServer::$_instance->COOKIE[$key] ) ) 
		{
			return $default;
		}
		return CCServer::$_instance->COOKIE[$key];
	}
1047371
public function server($name, $default = null)
    {
        return array_key_exists($name, $this->server) ? $this->server[$name] : $default;
    }
27219
public static function server($key=null,$default=null){
    return $key ? (isset($_SERVER[$key]) ? $_SERVER[$key] : (is_callable($default)?call_user_func($default):$default)) : $_SERVER;
  }
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;
    }
633122
public function getServerParam(string $key, $default = null)
    {
        $key = \strtoupper($key);

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

        return $result;
    }