class Package extends Package (View source)

The Flow Package

Properties

protected string $packageKey

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

from  GenericPackage
protected string $composerName

composer name for this package

from  GenericPackage
protected string $packagePath

Full path to this package's main directory

from  GenericPackage
protected string[] $namespaces

Array of all declared autoload namespaces contained in this package

from  GenericPackage
protected string[] $autoloadTypes from  GenericPackage
protected array $autoloadConfiguration from  GenericPackage
protected array $flattenedAutoloadConfiguration from  GenericPackage
protected bool $protected

Methods

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

Constructor

iterable
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.

void
boot(Bootstrap $bootstrap)

Invokes custom PHP code directly after the package manager has been initialized.

getFunctionalTestsClassFiles()

Returns a generator of filenames of class files provided by functional tests contained in this package

from  Package
string
getFunctionalTestsPath()

Returns the full path to this package's functional tests directory

from  Package
string
getResourcesPath()

Returns the full path to this package's Resources directory

from  Package
string
getConfigurationPath()

Returns the full path to this package's Configuration directory

from  Package

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

iterable getClassFiles()

Returns the array of filenames of the class files

Return Value

iterable

An array or yields the 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

void boot(Bootstrap $bootstrap)

Invokes custom PHP code directly after the package manager has been initialized.

Parameters

Bootstrap $bootstrap

The current bootstrap

Return Value

void

Generator getFunctionalTestsClassFiles()

internal  
 

Returns a generator of filenames of class files provided by functional tests contained in this package

Return Value

Generator

string getFunctionalTestsPath()

internal  TODO: Should be replaced by using autoload-dev
 

Returns the full path to this package's functional tests directory

Return Value

string

Path to this package's functional tests directory

string getResourcesPath()

Returns the full path to this package's Resources directory

Return Value

string

Path to this package's Resources directory

string getConfigurationPath()

Returns the full path to this package's Configuration directory

Return Value

string

Path to this package's Configuration directory