检查是否有分组权限
@param  string $alias 分组名
@param $pattern
@param string $method
@return bool 是否通过
434835
public function groupAllowed($alias, $pattern, $method = 'all')
    {
        if (isset($this->group[$alias])) {
            return false;
        }

        $rule = $this->group[$alias];
        return $rule->isAllowed($pattern, $method);
    }
314968
public static function hasApplied($class, $method) {
		foreach (static::_ids($class, $method) as $id) {
			if (isset(static::$_filters[$id])) {
				return true;
			}
		}
		return false;
	}
1227185
public function match($uri, $method){

        foreach($this->routes as $route){
            if($route->match($uri, $method)){ //调用每个对象Route查询是非匹配
                return $route;
            }
        }
        //没有找到匹配的路由
        return false;
    }
829839
public function add($name,$bind,$method='GET',$domain='',$suffix='')
    {
        $prefix=isset($this->group['prefix']) ? $this->group['prefix'] : '';
        $suffix=isset($this->group['suffix']) ? $this->group['suffix'] : '';
        $namespace=isset($this->group['namespace']) ? $this->group['namespace'].'/' : '';
        if(is_array($bind)){
            $as=$bind['as'];
            $bind=$bind['uses'];
        }else{
            $as='';
        }
        $this->index=Lists::set([
            'name'=>$as,
            'pattern'=>$prefix.$name.$suffix,
            'bind'=>$namespace.$bind,
            'method'=>$method,
            'domain'=>($domain=='' ? (isset($this->group['domain']) ? $this->group['domain'] : '') : $domain),
        ]);
        return $this;
    }
724959
public function runIfMatch($URL, $method='get'){
      return $this->match($URL,$method) ? $this->run($this->extractArgs($URL),$method) : null;
    }
271569
private function call(string $method, string $pattern, string $className, string $function, array $options = []): void
    {
        if (empty($className) || empty($function)) {
            throw new Exception('Missing params, we need 2 parameters');
        }

        $route = [
            'method' => $method,
            'pattern' => $pattern,
            'className' => $className,
            'function' => $function,
        ];
        $this->collections[] = $route;

        if (array_key_exists('options', $options)) {
            $this->setOptions($route, $options);
        }

        return;
    }
730941
public function addRule($pattern, $method = 'all')
    {
        if (is_array($pattern)) {
            foreach ($pattern as $_pattern) {
                $this->addRule($_pattern, $method);
            }
            return $this;
        }
        //解析URL段
        $this->rules[$pattern.'~~'.$method] = [$method, $this->parseRule($pattern)];
        return $this;
    }
472417
private function mapResource($method, $pattern, $controller, $action, $type = false)
    {
        return $this->router->match(
            strtoupper($method),
            $pattern,
            function ($router, $id) use ($controller, $action, $type) {
                $args = [$controller . '@' . $action];
                if ($type) {
                    $args = [$controller . '@' . $action, $id]; // delete, update
                }

                return $this->router->callController($args);
            }
        );
    }
8932
public function map(array $methods, string $pattern, $callable) : RouteInterface
    {
        $route = $this->getRouter()->map($methods, $pattern, $callable);

        return $route;
    }
820512
public String matchPattern(String alias) {
        // generate match pattern
        if (alias != null)
            return "(" + alias + processLabels(matchLabels, false) + ")";
        // pattern without alias
        return "(" + processLabels(matchLabels, false) + ")";
    }
136593
public function add($pattern, $paths = null, $method = null)
    {
        return $this->_addRoute($pattern, $paths, $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);
    }
622380
protected function hasPropelQueryAllocationExpression(MethodNode $method): bool
    {
        foreach ($method->findChildrenOfType('ClassOrInterfaceReference') as $referenceNode) {
            $isQueryReference = (bool)strpos($referenceNode->getName(), 'Query');

            if (!$isQueryReference) {
                continue;
            }

            $methodPostfixChild = $method->getFirstChildOfType('MethodPostfix');

            if ($methodPostfixChild !== null && $methodPostfixChild->getName() === 'create') {
                return true;
            }
        }

        return false;
    }
634044
public function rules($rules, $method = '*', array $option = [], array $pattern = [])
    {
        $this->group->addRules($rules, $method, $option, $pattern);
    }
661647
public static function getMethodSlot(ClassMethod $method)
    {
        $className = $method->getClassDefinition()->getCompleteName();
        $methodName = $method->getName();

        if (isset(self::$cacheMethodSlots[$className][$methodName])) {
            return self::$cacheMethodSlots[$className][$methodName];
        }

        $slot = self::$slot++;
        if ($slot >= self::MAX_SLOTS_NUMBER) {
            return 0;
        }

        self::$cacheMethodSlots[$className][$methodName] = $slot;

        return $slot;
    }
136721
public function isMatch($method, $url)
	{
		$match = false;

		if (\in_array($method, $this->responds_to))
		{
			\preg_match($this->compile(), $url, $matches);

			if ( ! empty($matches))
			{
				$this->matched_params = \array_merge(
					$this->defaults,
					$this->method_defaults[$method],
					$this->cleanMatches($matches)
				);

				$match = true;
			}
		}

		return $match;
	}
1072097
protected function matchMethods($method)
    {
        if (empty($this->methods)) {
            return true;
        }
        if (in_array($method, $this->methods)) {
            return true;
        }

        return false;
    }