获取$_REQUEST bool数据

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

@return null|bool|array
356451
public static function requestBool($name, $default = null)
    {
        if (isset($_REQUEST[$name]) && $_REQUEST[$name] !== '') return self::parseInputToBool($_REQUEST[$name]);
        return (is_null($default) ? null : ((bool)$default));
    }
932151
public function get($name, $default = false) {
        $value = $this->handler->get($name);
        if (is_null($value)) {
            return $default;
        }
        $jsonData = json_decode($value, true);
        // 检测是否为JSON数据 true 返回JSON解析数组, false返回源数据
        return (null === $jsonData) ? $value : $jsonData;
    }
199202
public static function get($name, $default = '') {
        $_GET = self::paramFilter($_GET);
        if (isset($_GET[$name])) {
            if (empty($_GET[$name])) {
                return $default;
            }
            return $_GET[$name];
        }
        return false;
    }
743218
private function isRequiredFilterValid(string $name, Request $request): bool
    {
        $matches = [];
        parse_str($name, $matches);
        if (!$matches) {
            return false;
        }

        $rootName = (string) (array_keys($matches)[0] ?? null);
        if (!$rootName) {
            return false;
        }

        if (\is_array($matches[$rootName])) {
            $keyName = array_keys($matches[$rootName])[0];

            $queryParameter = $request->query->get($rootName);

            return \is_array($queryParameter) && isset($queryParameter[$keyName]);
        }

        return null !== $request->query->get($rootName);
    }
911721
function get($field_name, $default=null)
    {
        if (!Auth_OpenID_checkFieldName($field_name)) {
            return null;
        }

        return Auth_OpenID::arrayGet($this->data, $field_name, $default);
    }
1297561
public function get($name, $default = null)
    {
        $parsed = explode('.', $name);

        $result = $_SESSION;

        while ($parsed) {
            $next = array_shift($parsed);

            if (isset($result[$next])) {
                $result = $result[$next];
            } else {
                return $default;
            }
        }

        return $result;
    }
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;
    }
1200368
public function request($name = null, $default = null)
    {
        if ($name) {
            return $this->request->request->get($name, $default);
        }

        return $this->request->request->all();
    }
21436
private static function getAttribute(ServerRequestInterface $request, $name, $default = null)
    {
        $attributes = $request->getAttribute(Middleware::KEY, []);

        if (isset($attributes[$name])) {
            return $attributes[$name];
        }

        return $default;
    }
87805
public static function getPostParameter(string $name, string $default = null, array $allowed = null): string
    {
        return self::get('POST', $name, $default, $allowed);
    }
410961
public function getServerParam($name, $default = null)
    {
        $params = $this->getServerParams();
        if (!isset($params[$name])) {
            return $default;
        }
        return $params[$name];
    }
948670
public function param($name, $default = null)
    {
        if(!$this->params)
            $this->params = $this->getMethod() == 'GET' ? $this->getQueryParams() : array_merge($this->getQueryParams(), $this->getParsedBody());

        return array_key_exists($name, $this->params) ? $this->params[$name] : $default;
    }
389003
public function get($name, $default = null)
    {
        $result = $default;
        if (isset($this->_data[$name])) {
            $result = $this->_data[$name]->value;
        }

        return $result;
    }
411010
public function getActionParam($name, $default = null)
    {
        $params = $this->getActionParams();
        return isset($params[$name]) ? $params[$name] : $default;
    }
703696
public function getParameter($name, $default = null)
    {
        try {
            return ArrayHelper::get($this->getParameters(), $name, $default);
        } catch (Exception $ex) {
            return $default;
        }
    }
1047371
public function server($name, $default = null)
    {
        return array_key_exists($name, $this->server) ? $this->server[$name] : $default;
    }
942676
public function getPostOrQuery(string $name, string $type = null, $default = null)
    {
        $post = $this->getPost($name, $type, $default);
        if (!is_null($post)) {
            return $post;
        }

        return $this->getQuery($name, $type, $default);
    }