class PackageFactory (View source)

Class for building Packages

Methods

create(string $packagesBasePath, string $packagePath, string $packageKey, string $composerName, array $autoloadConfiguration = [], array $packageClassInformation = null)

Returns a package instance.

array
detectFlowPackageFilePath(string $packageKey, string $absolutePackagePath)

Detects if the package contains a package file and returns the path and classname.

Details

PackageInterface|PackageKeyAwareInterface create(string $packagesBasePath, string $packagePath, string $packageKey, string $composerName, array $autoloadConfiguration = [], array $packageClassInformation = null)

Returns a package instance.

Parameters

string $packagesBasePath

the base install path of packages,

string $packagePath

path to package, relative to base path

string $packageKey

key / name of the package

string $composerName
array $autoloadConfiguration

Autoload configuration as defined in composer.json

array $packageClassInformation

Return Value

PackageInterface|PackageKeyAwareInterface

Exceptions

CorruptPackageException

array detectFlowPackageFilePath(string $packageKey, string $absolutePackagePath)

Detects if the package contains a package file and returns the path and classname.

Parameters

string $packageKey

The package key

string $absolutePackagePath

Absolute path to the package

Return Value

array

The path to the package file and classname for this package or an empty array if none was found.

Exceptions

CorruptPackageException
InvalidPackagePathException