src/Leevel/Router/Match/Annotation.php
protected function matchMain(): array
    {
        if (!($routers = $this->router->getRouters())) {
            return [];
        }

        // 匹配路由请求方法
        if (false === ($routers = $this->matcheMethod($routers))) {
            return [];
        }

        // 匹配 PathInfo
        $pathInfo = $this->matchePathInfo();

        // 静态路由匹配
        if (false !== ($result = $this->matcheStatic($routers))) {
            return $result;
        }

        // 匹配首字母
        if (false === ($routers = $this->matcheFirstLetter($pathInfo, $routers))) {
            return [];
        }

        // 匹配分组
        $routers = $this->matcheGroups($pathInfo, $routers);

        // 路由匹配
        if (false !== ($result = $this->matcheRegexGroups($routers))) {
            return $result;
        }

        return [];
    }
protected function matchMain(): array
    {
        if (!($routers = $this->router->getRouters())) {
            return [];
        }

        // 匹配路由请求方法
        if (false === ($routers = $this->matcheMethod($routers))) {
            return [];
        }

        // 匹配 PathInfo
        $pathInfo = $this->matchePathInfo();

        // 静态路由匹配
        if (false !== ($result = $this->matcheStatic($routers))) {
            return $result;
        }

        // 匹配首字母
        if (false === ($routers = $this->matcheFirstLetter($pathInfo, $routers))) {
            return [];
        }

        // 匹配分组
        $routers = $this->matcheGroups($pathInfo, $routers);

        // 路由匹配
        if (false !== ($result = $this->matcheRegexGroups($routers))) {
            return $result;
        }

        return [];
    }
主匹配.

@return array