src/Leevel/Router/Router.php
protected function parseMatchedBind()
    {
        if ($matchedBind = $this->matchedBind()) {
            if (false !== strpos($matchedBind, '@')) {
                list($bindClass, $method) = explode('@', $matchedBind);

                if (!class_exists($bindClass)) {
                    return false;
                }

                $controller = $this->container->make($bindClass);
            } else {
                if (!class_exists($matchedBind)) {
                    return false;
                }

                $controller = $this->container->make($matchedBind);
                $method = 'handle';
            }
        } else {
            $matchedApp = $this->matchedApp();
            $matchedController = $this->matchedController();
            $matchedAction = $this->matchedAction();

            // 尝试直接读取方法控制器类
            $controllerClass = $matchedApp.'\\'.$this->parseControllerDir().'\\'.
                $matchedController.'\\'.ucfirst($matchedAction);

            $controllerClass = $this->normalizeForSubdir($controllerClass);

            if (class_exists($controllerClass)) {
                $controller = $this->container->make($controllerClass);
                $method = 'handle';
            }

            // 尝试读取默认控制器
            else {
                $controllerClass = $matchedApp.'\\'.$this->parseControllerDir().'\\'.$matchedController;

                $controllerClass = $this->normalizeForSubdir($controllerClass);

                if (!class_exists($controllerClass)) {
                    return false;
                }

                $controller = $this->container->make($controllerClass);
                $method = $this->normalizeForSubdir($matchedAction, true);
            }
        }

        if (!method_exists($controller, $method)) {
            return false;
        }

        return [
            $controller,
            $method,
        ];
    }
protected function parseMatchedBind()
    {
        if ($matchedBind = $this->matchedBind()) {
            if (false !== strpos($matchedBind, '@')) {
                list($bindClass, $method) = explode('@', $matchedBind);

                if (!class_exists($bindClass)) {
                    return false;
                }

                $controller = $this->container->make($bindClass);
            } else {
                if (!class_exists($matchedBind)) {
                    return false;
                }

                $controller = $this->container->make($matchedBind);
                $method = 'handle';
            }
        } else {
            $matchedApp = $this->matchedApp();
            $matchedController = $this->matchedController();
            $matchedAction = $this->matchedAction();

            // 尝试直接读取方法控制器类
            $controllerClass = $matchedApp.'\\'.$this->parseControllerDir().'\\'.
                $matchedController.'\\'.ucfirst($matchedAction);

            $controllerClass = $this->normalizeForSubdir($controllerClass);

            if (class_exists($controllerClass)) {
                $controller = $this->container->make($controllerClass);
                $method = 'handle';
            }

            // 尝试读取默认控制器
            else {
                $controllerClass = $matchedApp.'\\'.$this->parseControllerDir().'\\'.$matchedController;

                $controllerClass = $this->normalizeForSubdir($controllerClass);

                if (!class_exists($controllerClass)) {
                    return false;
                }

                $controller = $this->container->make($controllerClass);
                $method = $this->normalizeForSubdir($matchedAction, true);
            }
        }

        if (!method_exists($controller, $method)) {
            return false;
        }

        return [
            $controller,
            $method,
        ];
    }
分析匹配绑定路由.

@return callable|false