class GenericPackage implements PackageInterface, PackageKeyAwareInterface (View source)

The generic base package that represents third party packages

Properties

protected string $packageKey

Unique key of this package. Example for the Flow package: "Neos.Flow"

protected string $composerName

composer name for this package

protected string $packagePath

Full path to this package's main directory

protected string[] $namespaces

Array of all declared autoload namespaces contained in this package

protected string[] $autoloadTypes
protected array $autoloadConfiguration
protected array $flattenedAutoloadConfiguration

Methods

__construct(string $packageKey, string $composerName, string $packagePath, array $autoloadConfiguration = [])

Constructor

array
getClassFiles()

Returns the array of filenames of the class files

string
getPackageKey()

Returns the package key of this package.

string
getComposerName()

Returns the packages composer name

array
getNamespaces()

Returns array of all declared autoload namespaces contained in this package

string[]
getAutoloadTypes()

No description

string
getPackagePath()

Returns the full path to this package's main directory

array
getAutoloadPaths()

No description

array
getAutoloadConfiguration()

Get the autoload configuration for this package. Any valid composer "autoload" configuration.

array
getFlattenedAutoloadConfiguration()

Get a flattened array of autoload configurations that have a predictable pattern (PSR-0, PSR-4)

mixed
getComposerManifest(string $key = null)

Returns contents of Composer manifest - or part there of.

string
getInstalledVersion()

Get the installed package version (from composer) and as fallback the version given by composer manifest.

string
normalizeAutoloadPath(string $autoloadType, string $autoloadNamespace, string $autoloadPath)

No description

getClassesInNormalizedAutoloadPath(string $baseAutoloadPath, string $autoloadNamespace)

No description

bool
isPathAutoloadEntryPoint(string $path)

No description

void
explodeAutoloadConfiguration()

Brings the composer autoload configuration into an easy to use format for various parts of Flow.

Details

__construct(string $packageKey, string $composerName, string $packagePath, array $autoloadConfiguration = [])

Constructor

Parameters

string $packageKey

Key of this package

string $composerName
string $packagePath

Absolute path to the location of the package's composer manifest

array $autoloadConfiguration

array getClassFiles()

Returns the array of filenames of the class files

Return Value

array

An array of class names (key) and their filename, including the relative path to the package's directory

string getPackageKey()

Returns the package key of this package.

Return Value

string

string getComposerName()

Returns the packages composer name

Return Value

string

array getNamespaces()

Returns array of all declared autoload namespaces contained in this package

Return Value

array

string[] getAutoloadTypes()

No description

Return Value

string[]

string getPackagePath()

Returns the full path to this package's main directory

Return Value

string

Path to this package's main directory

array getAutoloadPaths()

No description

Return Value

array

array getAutoloadConfiguration()

Get the autoload configuration for this package. Any valid composer "autoload" configuration.

Return Value

array

array getFlattenedAutoloadConfiguration()

Get a flattened array of autoload configurations that have a predictable pattern (PSR-0, PSR-4)

Return Value

array

Keys: "namespace", "classPath", "mappingType"

mixed getComposerManifest(string $key = null)

Returns contents of Composer manifest - or part there of.

Parameters

string $key

Return Value

mixed

string getInstalledVersion()

Get the installed package version (from composer) and as fallback the version given by composer manifest.

Return Value

string

protected string normalizeAutoloadPath(string $autoloadType, string $autoloadNamespace, string $autoloadPath)

No description

Parameters

string $autoloadType
string $autoloadNamespace
string $autoloadPath

Return Value

string

protected Generator getClassesInNormalizedAutoloadPath(string $baseAutoloadPath, string $autoloadNamespace)

No description

Parameters

string $baseAutoloadPath
string $autoloadNamespace

Return Value

Generator

protected bool isPathAutoloadEntryPoint(string $path)

No description

Parameters

string $path

Return Value

bool

protected void explodeAutoloadConfiguration()

Brings the composer autoload configuration into an easy to use format for various parts of Flow.

Return Value

void