public function create($packagesBasePath, $packagePath, $packageKey, $composerName, array $autoloadConfiguration = [], array $packageClassInformation = null)
    {
        $absolutePackagePath = Files::concatenatePaths([$packagesBasePath, $packagePath]) . '/';

        if ($packageClassInformation === null) {
            $packageClassInformation = $this->detectFlowPackageFilePath($packageKey, $absolutePackagePath);
        }

        $packageClassName = Package::class;
        if (!empty($packageClassInformation)) {
            $packageClassName = $packageClassInformation['className'];
            $packageClassPath = !empty($packageClassInformation['pathAndFilename']) ? Files::concatenatePaths([$absolutePackagePath, $packageClassInformation['pathAndFilename']]) : null;
        }

        if (!empty($packageClassPath)) {
            require_once($packageClassPath);
        }

        $package = new $packageClassName($packageKey, $composerName, $absolutePackagePath, $autoloadConfiguration);
        if (!$package instanceof PackageInterface) {
            throw new Exception\CorruptPackageException(sprintf('The package class of package "%s" does not implement \Neos\Flow\Package\PackageInterface. Check the file "%s".', $packageKey, $packageClassInformation['pathAndFilename']), 1427193370);
        }

        return $package;
    }
public function create($packagesBasePath, $packagePath, $packageKey, $composerName, array $autoloadConfiguration = [], array $packageClassInformation = null)
    {
        $absolutePackagePath = Files::concatenatePaths([$packagesBasePath, $packagePath]) . '/';

        if ($packageClassInformation === null) {
            $packageClassInformation = $this->detectFlowPackageFilePath($packageKey, $absolutePackagePath);
        }

        $packageClassName = Package::class;
        if (!empty($packageClassInformation)) {
            $packageClassName = $packageClassInformation['className'];
            $packageClassPath = !empty($packageClassInformation['pathAndFilename']) ? Files::concatenatePaths([$absolutePackagePath, $packageClassInformation['pathAndFilename']]) : null;
        }

        if (!empty($packageClassPath)) {
            require_once($packageClassPath);
        }

        $package = new $packageClassName($packageKey, $composerName, $absolutePackagePath, $autoloadConfiguration);
        if (!$package instanceof PackageInterface) {
            throw new Exception\CorruptPackageException(sprintf('The package class of package "%s" does not implement \Neos\Flow\Package\PackageInterface. Check the file "%s".', $packageKey, $packageClassInformation['pathAndFilename']), 1427193370);
        }

        return $package;
    }
public function create ( $ packagesBasePath , $ packagePath , $ packageKey , $ composerName , array $ autoloadConfiguration = [ ] , array $ packageClassInformation = null ) { $ absolutePackagePath = Files :: concatenatePaths ( [ $ packagesBasePath , $ packagePath ] ) . '/' ; if ( $ packageClassInformation === null ) { $ packageClassInformation = $ this -> detectFlowPackageFilePath ( $ packageKey , $ absolutePackagePath ) ; } $ packageClassName = Package :: class ; if ( ! empty ( $ packageClassInformation ) ) { $ packageClassName = $ packageClassInformation [ 'className' ] ; $ packageClassPath = ! empty ( $ packageClassInformation [ 'pathAndFilename' ] ) ? Files :: concatenatePaths ( [ $ absolutePackagePath , $ packageClassInformation [ 'pathAndFilename' ] ] ) : null ; } if ( ! empty ( $ packageClassPath ) ) { require_once ( $ packageClassPath ) ; } $ package = new $ packageClassName ( $ packageKey , $ composerName , $ absolutePackagePath , $ autoloadConfiguration ) ; if ( ! $ package instanceof PackageInterface ) { throw new Exception \ CorruptPackageException ( sprintf ( 'The package class of package "%s" does not implement \Neos\Flow\Package\PackageInterface. Check the file "%s".' , $ packageKey , $ packageClassInformation [ 'pathAndFilename' ] ) , 1427193370 ) ; } return $ package ; }
Returns a package instance.

@param string $packagesBasePath the base install path of packages,
@param string $packagePath path to package, relative to base path
@param string $packageKey key / name of the package
@param string $composerName
@param array $autoloadConfiguration Autoload configuration as defined in composer.json
@param array $packageClassInformation
@return PackageInterface|PackageKeyAwareInterface
@throws Exception\CorruptPackageException
Returns a package instance .