class PackageFactory (View source)

Class for building Packages

Methods

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

Returns a package instance.

array
detectFlowPackageFilePath(FlowPackageKey $packageKey, string $absolutePackagePath)

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

Details

PackageInterface create(string $packagesBasePath, string $packagePath, FlowPackageKey $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

FlowPackageKey $packageKey

key / name of the package

string $composerName
array $autoloadConfiguration

Autoload configuration as defined in composer.json

array $packageClassInformation

Return Value

PackageInterface

Exceptions

CorruptPackageException

array detectFlowPackageFilePath(FlowPackageKey $packageKey, string $absolutePackagePath)

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

Parameters

FlowPackageKey $packageKey

The package key

string $absolutePackagePath

Absolute path to the package

Return Value

array

Exceptions

CorruptPackageException
InvalidPackagePathException