src/Leevel/Router/Match/PathInfo.php
protected function matcheMvc(array $path): array
    {
        $result = [];

        if (1 === count($path)) {
            $result[IRouter::CONTROLLER] = array_pop($path);
        } else {
            if ($path) {
                $result[IRouter::ACTION] = array_pop($path);
            }

            if ($path) {
                $result[IRouter::CONTROLLER] = array_pop($path);
            }

            if ($path) {
                $result[IRouter::PREFIX] = $path;
            }
        }

        return $result;
    }
protected function matcheMvc(array $path): array
    {
        $result = [];

        if (1 === count($path)) {
            $result[IRouter::CONTROLLER] = array_pop($path);
        } else {
            if ($path) {
                $result[IRouter::ACTION] = array_pop($path);
            }

            if ($path) {
                $result[IRouter::CONTROLLER] = array_pop($path);
            }

            if ($path) {
                $result[IRouter::PREFIX] = $path;
            }
        }

        return $result;
    }
匹配路由 Mvc.

@param array $path

@return array