只要有一个规则满足即可
@param  不定参数
@param string $method
@return bool
343793
public function anyAllowed($rules, $method = "all")
    {
        foreach ($rules as $rule) {
            if ($this->isAllowed($rule, $method)) {
                return true;
            }
        }
        return false;
    }
224885
public function isMethod($methods)
    {
        if (is_array($methods)) {
            return in_array($this->getMethod(), $methods);
        }

        if (is_string($methods)) {
            return ($this->getMethod() == $methods);
        }

        return false;
    }
856938
protected function firstNotNullResult($method)
    {
        $args = func_get_args();

        $method = array_shift($args);

        foreach ($this->candidates as $candidate) {

            $result = call_user_func_array([$candidate, $method], $args);

            if ($result !== null) {
                return $result;
            }

        }

        return null;
    }
314968
public static function hasApplied($class, $method) {
		foreach (static::_ids($class, $method) as $id) {
			if (isset(static::$_filters[$id])) {
				return true;
			}
		}
		return false;
	}
1271760
public function clear($class, $method)
    {
        $cache_path = $this->config->get('cache_path');

        // we know which one we're clearing
        if ($method) {
            $directory = $this->_prep_path($class, $method);

            return (bool) $this->_delete_dir($cache_path.$directory);
        } else {
            // we're clearing everything for this class
            $directory = $this->_prep_path($class);

            return (bool) $this->_delete_dir($cache_path.$directory);
        }
    }
1072097
protected function matchMethods($method)
    {
        if (empty($this->methods)) {
            return true;
        }
        if (in_array($method, $this->methods)) {
            return true;
        }

        return false;
    }
1363535
public function methodIsCallable($method)
    {
        return ! $this->methodIsBlacklisted($method) &&
            method_exists($this, $method) &&
            ! method_exists(ModelFilter::class, $method);
    }
280902
public function methodsContains($method) {
        if (is_string($method)) {
            $method = array($method);
        }
        $this->rule = "contains";
        $this->method = $method;
        return $this;
    }
1011352
protected static function method_exists( $object, $method )
    {
        if ( !is_array( $method ) )
        {
            $method = array($method);
        }

        foreach ( $method as $_method )
        {
            if ( method_exists( $object, $_method ) )
            {
                return $_method;
            }
        }

        return false;
    }
1371651
public function method($method = false)
    {
        if (true === $method) {
            // 获取原始请求类型
            return $this->isCli() ? 'GET' : (isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']);
        } elseif (!$this->method) {
            if (isset($_POST[$this->config->get('var_method')])) {
                $this->method = strtoupper($_POST[$this->config->get('var_method')]);
                $this->{$this->method}($_POST);
            } elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
                $this->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
            } else {
                $this->method = $this->isCli() ? 'GET' : (isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']);
            }
        }
        return $this->method;
    }
1096262
public static function isMethod($method = null) {
		return isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) == strtolower(trim($method)) : false;
	}
157681
protected function objectMethodExists($object, $method)
    {
        if (method_exists($object, 'methodExists')) {
            return $object->methodExists($method);
        }

        return method_exists($object, $method);
    }
494035
final public function hasMethod($method)
    {
        if (!Str::is($method)
            || !Str::match($method, "/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/")
        ) {
            throw new \InvalidArgumentException(
                "The \$method parameter must be a string and follow the PHP rules of method naming."
            );
        }

        return method_exists($this, $method);
    }
1353934
public function matches($url, $method)
    {
        if ($this->httpmethod !== 'ANY' && strtolower($method) !== strtolower($this->httpmethod)) {
            return false;
        }

        // Exact match OR pattern match
        return $this->pattern == $url || $this->patternMatch($url);
    }
1196834
private function haveParameter($method, $parameter)
    {
        foreach ($method->getParameters() as $param) {
            if ($param->name == $parameter) {
                return true;
            }
        }
        return false;
    }
298032
private function validateMethod($method)
    {
        $prefix = substr($method, 0, 3);

        if ($prefix === 'get' || $prefix === 'set' || $prefix === 'has') {
            return lcfirst(substr($method, 3));
        }

        $prefix = substr($prefix, 0, 2);

        if ($prefix === 'is') {
            return lcfirst(substr($method, 2));
        }
    }
1302420
public function checkToken($method = 'post') {
        $token = $this->getFormToken();

        if (!$this->input->$method->get($token, '', 'alnum')) {
            if ($this->getSession()->isNew()) {
                // Redirect to login screen.
                $this->redirect('/login');
                $this->close();
            }

            return false;
        }

        return true;
    }