public function guessExtensionNameFromManifest(string $manifest, string $path): ?string
    {
        if (\rtrim($this->config['path.app'], '/') === \rtrim($path, '/')) {
            return 'app';
        }

        list($vendor, $package) = $namespace = $this->resolveExtensionNamespace($manifest);

        if (\is_null($vendor) && \is_null($package)) {
            return null;
        }

        // Each package should have vendor/package name pattern.
        $name = \trim(\implode('/', $namespace));

        return $this->validateExtensionName($name);
    }
public function guessExtensionNameFromManifest(string $manifest, string $path): ?string
    {
        if (\rtrim($this->config['path.app'], '/') === \rtrim($path, '/')) {
            return 'app';
        }

        list($vendor, $package) = $namespace = $this->resolveExtensionNamespace($manifest);

        if (\is_null($vendor) && \is_null($package)) {
            return null;
        }

        // Each package should have vendor/package name pattern.
        $name = \trim(\implode('/', $namespace));

        return $this->validateExtensionName($name);
    }
public function guessExtensionNameFromManifest ( string $ manifest , string $ path ) : ? string { if ( \ rtrim ( $ this -> config [ 'path.app' ] , '/' ) === \ rtrim ( $ path , '/' ) ) { return 'app' ; } list ( $ vendor , $ package ) = $ namespace = $ this -> resolveExtensionNamespace ( $ manifest ) ; if ( \ is_null ( $ vendor ) && \ is_null ( $ package ) ) { return null ; } // Each package should have vendor/package name pattern. $ name = \ trim ( \ implode ( '/' , $ namespace ) ) ; return $ this -> validateExtensionName ( $ name ) ; }
Guess extension name from manifest.

@param  string  $manifest
@param  string  $path

@throws \RuntimeException

@return string|null
Guess extension name from manifest .