获取$_REQUEST string数据

@param string $name 要获取的变量
@param null $default 未获取到$_REQUEST值时返回的默认值

@return null|string|array
977958
public static function requestString($name, $default = null)
    {
        if (isset($_REQUEST[$name]) && $_REQUEST[$name] !== '') return self::parseInputToString($_REQUEST[$name]);
        return $default;
    }
870426
public function getHeader(string $name, string $default = ''): string
    {
        switch ($this->type) {
            // Check the request is PSR-7 http message.
            case 'psr-7':
                return $this->request->getHeaderLine($name) ?: $default;

            // Check the is Laravel or Symfony.
            case 'laravel':
            case 'symfony':
                return $this->request->headers->get($name, $default);

            case 'thinkphp':
                return $this->request->header($name, $default);
        }

        // Not using framewoerk ?
        // Read global variable $_REQUEST.
        foreach ($this->request as $key => $value) {
            if (strtolower($key) === strtolower($name)) {
                return (string) $value;
            }
        }

        // return default line string.
        return $default;
    }
991332
public function getPathParameter($name, $default = null) {

		// lazy initialization of parameters

		if(empty($this->pathParameters) && !is_null($this->placeholders)) {

			// collect all placeholder names

			$names = array_keys($this->placeholders);

			// extract values

			if(preg_match('~' . $this->match . '~', ltrim(Request::createFromGlobals()->getPathInfo(), '/'), $values)) {

				array_shift($values);

				// if not all parameters are set, try to fill up with defaults

				$offset = count($values);

				if($offset < count($names)) {
					
					while($offset < count($names)) {
						if(isset($this->placeholders[$names[$offset]]['default'])) {
							$values[] = $this->placeholders[$names[$offset]]['default'];
						}
						++$offset;
					}
				}

				// only set parameters when count of placeholders matches count of values, that can be evaluated

				if(count($values) === count($names)) {
					$this->pathParameters = array_combine($names, $values);
				}
			}

		}

		$name = strtolower($name);

		if(isset($this->pathParameters[$name])) {

			// both bool false and null are returned as null

			if($this->pathParameters[$name] === false || is_null($this->pathParameters[$name])) {
				return null;
			}

			return $this->pathParameters[$name];
		}

		return $default;

	}
543438
public function get($name = null, $default = null, $type = null)
    {
        $get = $this->request['get'];
        gplcart_array_trim($get, true);

        if (isset($name)) {
            $result = gplcart_array_get($get, $name);
            $return = isset($result) ? $result : $default;
        } else {
            $return = $get;
        }

        gplcart_settype($return, $type, $default);
        return $return;
    }
1225022
public function get(string $name, $default = null)
    {
        $key = strtolower($name);
        if (!array_key_exists($key, $this->headers)) {
            return $default;
        }

        return $this->headers[$key]->getValuesAsString();
    }
567945
public function get($name = null, $default = null)
    {
        $context = $this->_context;

        if (!$context->started) {
            $this->_start();
        }

        if ($name === null) {
            return $context->_SESSION;
        } elseif (isset($context->_SESSION[$name])) {
            return $context->_SESSION[$name];
        } else {
            return $default;
        }
    }
571941
public function get($name, $default = '', $xss_clean = true) {
        if ($xss_clean) {
            $ary = isset ($this->userData [ $name ]) ? $this->userData : (isset ($_REQUEST [ $name ]) ? $_REQUEST : []);
        } else {
            $ary = isset ($this->userData [ $name ]) ? $this->userData : (isset ($this->requestData [ $name ]) ? $this->requestData : []);
        }

        if (!$ary && strpos($name, '.') > 0) {
            $name = explode('.', $name);
            if (isset($this->arrayData[ $name[0] ])) {
                $ary = $this->arrayData[ $name[0] ];
            } else {
                $ary = $this->arrayData[ $name[0] ] = $this->get($name[0], [], $xss_clean);
            }
            $name = $name[1];
        }

        if (!isset ($ary [ $name ])) {

            return $default;
        }

        return $ary [ $name ];
    }
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);
    }
1370321
function get($key, $default = null)
	{
		return $_GET[$key] ?? $this->params[$key] ?? $_POST[$key] ?? $_REQUEST[$key] ?? $default;
	//	return $post && isset($_POST[$name]) ? $_POST[$name] : ($get && isset($_GET[$name]) ? $_GET[$name] : $default);
	}
937646
public function getQuery($name, $default = null)
    {
        return isset($this->gets[$name]) ? $this->gets[$name] : $default;
    }
1030122
public static function requestInt($name, $default = null)
    {
        if (isset($_REQUEST[$name]) && $_REQUEST[$name] !== '') return self::parseInputToInt($_REQUEST[$name]);
        return (is_null($default) ? null : intval($default));
    }
1360506
public function getParam($name, $default = null)
    {
        if (\is_array($this->params)) {
            // Check in params that are arrays or implement array access
            return $this->params[$name] ?? $default;
        } elseif (\is_object($this->params)) {
            // Check in normal objects
            return $this->params->{$name} ?? $default;
        } else {
            // Wrong type, return default value
            return $default;
        }
    }
1219056
public function getParam($name, $default = null)
    {
        if (isset($this->params[$name])) {
            return $this->params[$name];
        }

        return $default;
    }
353813
public function get( $name, $key, $default = null ) {
		return $this->app->utility->array_get( $this->load( $name ), $key, $default );
	}
103440
public function getPost($name = null, $filters = null, $defaultValue = null, $notAllowEmpty = false, $noRecursive = false)
    {
        // perform parent function
        $request = parent::getPost($name, $filters, $defaultValue);

        // special handling for array requests, for individual inputs return what is request
        if (is_array($request) and $this->defaultCaseFormat != false) {
            if ($this->getJsonRawBody() == null) {
                return $this->convertCase($request);
            } else {
                return $this->getJsonRawBody();
            }
        } else {
            return $request;
        }
    }
627407
public static function post($name, $default = '') {
        $_POST = self::paramFilter($_POST);
        if (isset($_POST[$name])) {
            if (empty($_POST[$name])) {
                return $default;
            }
            return $_POST[$name];
        }
        return false;
    }
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;
    }