Gets variable from $_SERVER

@param string $name
@param mixed  $default

@return mixed
323541
public function getServer($name = null, $default = '')
    {
        $context = $this->_context;

        if ($name === null) {
            return $context->_SERVER;
        } else {
            return isset($context->_SERVER[$name]) ? $context->_SERVER[$name] : $default;
        }
    }
839841
protected function getQueryParam($name, $default = null)
    {
        return isset($this->request->getQueryParams()[$name]) ? $this->request->getQueryParams()[$name] : $default;
    }
504835
public function getRequest($name, $default = null)
    {
        if (isset($this->queryParams[$name])) {
            return $this->queryParams[$name];
        }

        if (isset($this->bodyParams[$name])) {
            return $this->bodyParams[$name];
        }

        return $default;
    }
446103
public function getServer(string $name)
    {
        $name = strtoupper($name);
        foreach ($this->server as $current => $value) {
            if ($current == $name) {
                return $value;
            }
        }

        return null;
    }
111883
public function variable_get($name, $default = NULL)
  {
    $vars = $this->drush->setDrushOptions(['format' => 'json'])->variableGet();
    if (!isset($vars[$name])) {
      return $default;
    }
    return $vars[$name];
  }
326885
public function get($name, $default = null)
    {
        if (isset($this->body[$name])) {
            return $this->body[$name];
        }

        return $default;
    }
627289
public static function get(string $name, $default = null)
    {
        $names = Imi::parseDotRule($name);
        if (isset($names[0]))
        {
            $first = array_shift($names);
            if('@currentServer' === $first)
            {
                if($isCurrentServer = (RequestContext::exsits() && null !== ($server = RequestContext::getServer())))
                {
                    $first = '@server';
                    array_unshift($names, $server->getName());
                }
                else
                {
                    $first = '@app';
                }
            }
            else
            {
                $isCurrentServer = false;
            }
            if(isset(static::$configs[$first]))
            {
                $result = static::$configs[$first]->get($names, null);
            }
            if(isset($result))
            {
                return $result;
            }
            else if($isCurrentServer)
            {
                $first = '@app';
                array_shift($names);
                return static::$configs[$first]->get($names, $default);
            }
        }
        return $default;
    }
294528
public static function get($name = '', $default = null)
    {
        if(is_integer($name))
        {
            $data = $_SERVER['argv'];
        }
        else
        {
            $data = &static::$cliArgs;
        }
        if ('' === $name)
        {
            // 全部的值
            return $data;
        }
        // 判断指定的值是否存在
        else if (isset($data[$name]))
        {
            return $data[$name];
        }
        else
        {
            // 返回默认值
            return $default;
        }
    }
524737
public static function get(string $name, $default = null)
    {
        $value = getenv($name);

        if ($value === false) {
            return static::value($default);
        }

        switch (strtolower($value)) {
            case 'true':
            case '(true)':
                return true;

            case 'false':
            case '(false)':
                return false;

            case 'null':
            case '(null)':
                return null;
        }

        return static::sanitise($value);
    }
1357186
public function get($name = null, $default = '', $sanitize = true)
    {
        if (!isset($name)) {
            return $this->server;
        }

        if (!array_key_exists($name, $this->server)) {
            return $default;
        }

        if (is_array($this->server[$name])) {
            gplcart_array_trim($this->server[$name], $sanitize);
        } else {

            $this->server[$name] = trim($this->server[$name]);

            if ($sanitize) {
                $this->server[$name] = filter_var($this->server[$name], FILTER_SANITIZE_STRING);
            }
        }

        return $this->server[$name];
    }
570814
public function get($name, $default = null)
    {
        if($name == 'pages' && !isset($this->pages)) {
            $this->pages = $this->_pages();
        }
        
        return parent::get($name);
    }
187994
public function get($name, $default = null)
    {
        return isset($this->requestCookies[$name]) ? $this->requestCookies[$name] : $default;
    }
529
public static function get($name, $default = null)
    {
        if (isset(static::$jar[$name])) {
            return static::parse(static::$jar[$name]['value']);
        }

        $cookie = Request::$cookieData;

        if (!is_null($value = $cookie->get($name))) {
            return static::parse($value);
        }

        return $default;
    }
521414
public static function get($name, $default = null)
    {
        $key = static::getContextKey();
        if(!isset(static::$context[$key]))
        {
            static::$context[$key] = RequestContext::getServerBean('ConnectContextStore')->read($key);
        }
        return static::$context[$key][$name] ?? $default;
    }
786508
public function getServerParam($name, $default = null)
    {
        if (isset($this->serverParams[$name])) {
            return $this->serverParams[$name];
        }

        return $default;
    }
309380
public function getServer($name, $default = null)
    {
        return isset($this->servers[$name]) ? $this->servers[$name] : $default;
    }
906134
public function get($name, $default = null)
    {
        $result = $default;
        if($this->offsetExists($name)) {
            $result = $this->offsetGet($name);
        }

        return $result;
    }