获取SERVER数据

@param string $param
@param mixed|null $defaultValue

@return mixed
344289
protected function getServer($param = null, $defaultValue = null)
    {
        if ($param === null) {
            return $this->getRequest()->getServer();
        }

        return $this->getRequest()->getServer($param, $defaultValue);
    }
537777
public function getValue(string $key, $defaultValue = null)
    {
        if ($this->offsetExists($key)) {
            return $this->offsetGet($key);
        } else {
            return $defaultValue;
        }
    }
289899
public function server( $key = null, $default = null ) {
		return func_num_args() === 0 ? $_SERVER : $this->app->utility->array_get( $_SERVER, strtoupper( $key ), $default );
	}
266289
public function get($id, $defaultValue = null)
    {
        if ($this->contains($id)) {
            return $this->fetch($id);
        }

        return $defaultValue;
    }
880935
public function getHeaderValue($name, $defaultValue = null)
    {
        $header = $this->getHeader($name);
        if ($header !== null) {
            return $header->getValue();
        }
        return $defaultValue;
    }
366610
public function getQueryParam($param, $default = null, $filter = null, $filterOptions = null)
    {
        $params = $this->getQueryParams();
        $value = isset($params[$param]) ? $params[$param] : $default;
        
        if (isset($filter) && isset($value)) {
            $value = filter_var($value, $filter, $filterOptions);
        }
        
        return $value;
    }
114803
public String getRequestParam(HttpServletRequest request, String param, String defaultValue)
    {
        String value = request.getParameter(servicePid + '.' + param);
        if ((value == null) && (properties != null))
            value = properties.get(servicePid + '.' + param);
        if (value == null)
            value = request.getParameter(param);
        if ((value == null) && (properties != null))
            value = properties.get(param);
        if (value == null)
                value = defaultValue;
        return value;
    }
935992
public function getParameter($parameterName, $defaultValue = null)
    {
        if ($this->getConfigResolver()->hasParameter($parameterName)) {
            return $this->getConfigResolver()->getParameter($parameterName);
        }

        return $defaultValue;
    }
172765
protected function getParam($param = null, $defaultValue = null)
    {
        $request = $this->getRequest();
        if ($param === null) {
            return array_merge($request->getQuery(), $request->getParams());
        }

        $value = $request->getParam($param);
        if ($value === null) {
            return $request->getQuery($param, $defaultValue);
        }

        return $value;
    }
183148
private static function _getRequestParam($name, $defaultValue = null)
    {
        $value = $defaultValue;
        $request = Yii::$app->request;

        $get = $request->get($name, $defaultValue);
        $post = $request->post($name, $defaultValue);

        if ($post !== $defaultValue) {
            return $post;
        } elseif ($get !== $defaultValue) {
            return $get;
        }

        return $value;
    }
490349
public function get($paramName = null, $default = null)
    {
        $result = $default;

        $params = $this->getRequestParams();

        if ($paramName === null) {
            $result = $params;
        } elseif (isset($params[$paramName])) {
            $result = $params[$paramName];
        }

        return $result;
    }
366894
public function server($name = "", $default = null, $filter = null) {
        if (empty($this->server)) {
            $this->server = $_SERVER;
        }
        if (!$name) {
            $value = $this->server;
        } else {
            $value = $this->server[ $name ];
        }
        return $this->value($value, $default, $filter);
    }
402380
private function getParameter($values, $key, $defaultValue = null)
    {
        return array_key_exists($key, $values) ? $values[$key] : $defaultValue;
    }
1234693
protected function getParam($name, $defaultValue = null)
    {
        return $this->requestMethod == self::REQUEST_METHOD_GET ?
            Yii::$app->request->getQueryParam($name, $defaultValue) :
            Yii::$app->request->getBodyParam($name, $defaultValue);
    }
350269
protected function getQuery($param = null, $defaultValue = null)
    {
        if ($param === null) {
            return $this->getRequest()->getQuery();
        }

        return $this->getRequest()->getQuery($param, $defaultValue);
    }
1316493
protected function getCookie($param = null, $defaultValue = null)
    {
        if ($param === null) {
            return $this->getRequest()->getCookie();
        }

        return $this->getRequest()->getCookie($param, $defaultValue);
    }
831937
public function getRequestEscapedParameter($name, $defaultValue = null)
    {
        $value = $this->getRequestParameter($name, $defaultValue);

        // TODO: remove this after special chars concept implementation
        $isAdmin = Registry::getConfig()->isAdmin() && Registry::getSession()->getVariable("blIsAdmin");
        if ($value !== null && !$isAdmin) {
            $this->checkParamSpecialChars($value);
        }

        return $value;
    }