src/Leevel/Kernel/Console/Autoload.php
protected function prefixesPsr4(): array
    {
        $lengths = $prefixs = [];

        $composerStaticClass = $this->composerStaticClass();
        $prefixesPsr4 = $composerStaticClass::$prefixDirsPsr4;

        foreach ($this->optimizeNamespaces() as $prefix) {
            $first = $prefix[0];
            $prefix .= '\\';

            $lengths[$first][$prefix] = strlen($prefix);

            if (isset($prefixesPsr4[$prefix])) {
                $prefixs[$prefix] = $prefixesPsr4[$prefix];
            }
        }

        return [$lengths, $prefixs];
    }
protected function prefixesPsr4(): array
    {
        $lengths = $prefixs = [];

        $composerStaticClass = $this->composerStaticClass();
        $prefixesPsr4 = $composerStaticClass::$prefixDirsPsr4;

        foreach ($this->optimizeNamespaces() as $prefix) {
            $first = $prefix[0];
            $prefix .= '\\';

            $lengths[$first][$prefix] = strlen($prefix);

            if (isset($prefixesPsr4[$prefix])) {
                $prefixs[$prefix] = $prefixesPsr4[$prefix];
            }
        }

        return [$lengths, $prefixs];
    }
获取 psr4 前缀.

@return array