src/Leevel/Router/Router.php
protected function normalizeForSubdir(string $className, bool $forAction = false): string
    {
        if (false === strpos($className, ':')) {
            return $className;
        }

        $className = preg_replace_callback(
            '/:([a-zA-Z])/',
            function (array $matches) use ($forAction) {
                return false === $forAction ? '\\'.ucfirst($matches[1]) : ucfirst($matches[1]);
            },
            $className
        );

        return str_replace('\\\\', '\\', $className);
    }
protected function normalizeForSubdir(string $className, bool $forAction = false): string
    {
        if (false === strpos($className, ':')) {
            return $className;
        }

        $className = preg_replace_callback(
            '/:([a-zA-Z])/',
            function (array $matches) use ($forAction) {
                return false === $forAction ? '\\'.ucfirst($matches[1]) : ucfirst($matches[1]);
            },
            $className
        );

        return str_replace('\\\\', '\\', $className);
    }
控制器和方法子目录支持.

@param string $className
@param bool   $forAction

@return string