Neos\Kickstarter\Service\GeneratorService::getPrimaryNamespaceAndEntryPath PHP Method

getPrimaryNamespaceAndEntryPath() protected method

protected getPrimaryNamespaceAndEntryPath ( Neos\Flow\Package\PackageInterface $package ) : array
$package Neos\Flow\Package\PackageInterface
return array
    protected function getPrimaryNamespaceAndEntryPath(PackageInterface $package)
    {
        $autoloadConfigurations = $package->getComposerManifest('autoload');
        $firstAutoloadType = null;
        $firstAutoloadConfiguration = null;
        foreach ($autoloadConfigurations as $autoloadType => $autoloadConfiguration) {
            if (ClassLoader::isAutoloadTypeWithPredictableClassPath($autoloadType)) {
                $firstAutoloadType = $autoloadType;
                $firstAutoloadConfiguration = $autoloadConfiguration;
                break;
            }
        }
        $autoloadPaths = reset($firstAutoloadConfiguration);
        $firstAutoloadPath = is_array($autoloadPaths) ? reset($autoloadPaths) : $autoloadPaths;
        $namespace = key($firstAutoloadConfiguration);
        $autoloadPathPostfix = '';
        if ($firstAutoloadType === ClassLoader::MAPPING_TYPE_PSR0) {
            $autoloadPathPostfix = str_replace('\\', '/', trim($namespace, '\\'));
        }
        return [$namespace, Files::concatenatePaths([$package->getPackagePath(), $firstAutoloadPath, $autoloadPathPostfix]), $firstAutoloadType];
    }