PHP Class Neos\Flow\Package\Package

Inheritance: implements Neos\Flow\Package\PackageInterface
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$autoloadConfiguration array
$autoloadTypes string[]
$composerName string composer name for this package
$flattenedAutoloadConfiguration array
$namespace string The namespace of the classes contained in this package
$namespaces string[] Array of all declared autoload namespaces contained in this package
$objectManagementEnabled boolean Disable this flag if you don't need object management for your package and want to save some memory.
$packageKey string Unique key of this package. Example for the Flow package: "Neos.Flow"
$packagePath string Full path to this package's main directory
$protected boolean If this package is protected and therefore cannot be deactivated or deleted

Méthodes publiques

Méthode Description
__construct ( string $packageKey, string $composerName, string $packagePath, array $autoloadConfiguration = [] ) Constructor
boot ( Bootstrap $bootstrap ) : void Invokes custom PHP code directly after the package manager has been initialized.
getAutoloadConfiguration ( ) : array Get the autoload configuration for this package. Any valid composer "autoload" configuration.
getAutoloadPaths ( ) : array
getAutoloadTypes ( ) : string[]
getClassFiles ( ) : Generator Returns the array of filenames of the class files
getComposerManifest ( string $key = null ) : array | mixed Returns contents of Composer manifest - or part there of.
getComposerName ( ) : string Returns the packages composer name
getConfigurationPath ( ) : string Returns the full path to this package's Configuration directory
getFlattenedAutoloadConfiguration ( ) : array Get a flattened array of autoload configurations that have a predictable pattern (PSR-0, PSR-4)
getFunctionalTestsClassFiles ( ) : array Returns the array of filenames of class files provided by functional tests contained in this package
getFunctionalTestsPath ( ) : string Returns the full path to this package's functional tests directory
getInstalledVersion ( ) : string Get the installed package version (from composer) and as fallback the version given by composer manifest.
getNamespaces ( ) : array Returns array of all declared autoload namespaces contained in this package
getPackageKey ( ) : string Returns the package key of this package.
getPackagePath ( ) : string Returns the full path to this package's main directory
getResourcesPath ( ) : string Returns the full path to this package's Resources directory
isObjectManagementEnabled ( ) : boolean Tells if files in the Classes directory should be registered and object management enabled for this package.
isProtected ( ) : boolean Tells if this package is protected and therefore cannot be deactivated or deleted
setProtected ( boolean $protected ) : void Sets the protection flag of the package

Méthodes protégées

Méthode Description
explodeAutoloadConfiguration ( ) : void Brings the composer autoload configuration into an easy to use format for various parts of Flow.
getClassesInNormalizedAutoloadPath ( string $baseAutoloadPath, string $autoloadNamespace ) : Generator
isPathAutoloadEntryPoint ( string $path ) : boolean
normalizeAutoloadPath ( string $autoloadType, string $autoloadNamespace, string $autoloadPath ) : string

Method Details

__construct() public méthode

Constructor
public __construct ( string $packageKey, string $composerName, string $packagePath, array $autoloadConfiguration = [] )
$packageKey string Key of this package
$composerName string
$packagePath string Absolute path to the location of the package's composer manifest
$autoloadConfiguration array

boot() public méthode

Invokes custom PHP code directly after the package manager has been initialized.
public boot ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap The current bootstrap
Résultat void

explodeAutoloadConfiguration() protected méthode

Brings the composer autoload configuration into an easy to use format for various parts of Flow.
protected explodeAutoloadConfiguration ( ) : void
Résultat void

getAutoloadConfiguration() public méthode

Get the autoload configuration for this package. Any valid composer "autoload" configuration.
public getAutoloadConfiguration ( ) : array
Résultat array

getAutoloadPaths() public méthode

public getAutoloadPaths ( ) : array
Résultat array

getAutoloadTypes() public méthode

public getAutoloadTypes ( ) : string[]
Résultat string[]

getClassFiles() public méthode

Returns the array of filenames of the class files
public getClassFiles ( ) : Generator
Résultat Generator A Generator for class names (key) and their filename, including the absolute path.

getClassesInNormalizedAutoloadPath() protected méthode

protected getClassesInNormalizedAutoloadPath ( string $baseAutoloadPath, string $autoloadNamespace ) : Generator
$baseAutoloadPath string
$autoloadNamespace string
Résultat Generator

getComposerManifest() public méthode

Returns contents of Composer manifest - or part there of.
public getComposerManifest ( string $key = null ) : array | mixed
$key string Optional. Only return the part of the manifest indexed by 'key'
Résultat array | mixed

getComposerName() public méthode

Returns the packages composer name
public getComposerName ( ) : string
Résultat string

getConfigurationPath() public méthode

Returns the full path to this package's Configuration directory
public getConfigurationPath ( ) : string
Résultat string Path to this package's Configuration directory

getFlattenedAutoloadConfiguration() public méthode

Get a flattened array of autoload configurations that have a predictable pattern (PSR-0, PSR-4)
public getFlattenedAutoloadConfiguration ( ) : array
Résultat array Keys: "namespace", "classPath", "mappingType"

getFunctionalTestsClassFiles() public méthode

Returns the array of filenames of class files provided by functional tests contained in this package
public getFunctionalTestsClassFiles ( ) : array
Résultat array An array of class names (key) and their filename, including the relative path to the package's directory

getFunctionalTestsPath() public méthode

Returns the full path to this package's functional tests directory
public getFunctionalTestsPath ( ) : string
Résultat string Path to this package's functional tests directory

getInstalledVersion() public méthode

Get the installed package version (from composer) and as fallback the version given by composer manifest.
public getInstalledVersion ( ) : string
Résultat string

getNamespaces() public méthode

Returns array of all declared autoload namespaces contained in this package
public getNamespaces ( ) : array
Résultat array

getPackageKey() public méthode

Returns the package key of this package.
public getPackageKey ( ) : string
Résultat string

getPackagePath() public méthode

Returns the full path to this package's main directory
public getPackagePath ( ) : string
Résultat string Path to this package's main directory

getResourcesPath() public méthode

Returns the full path to this package's Resources directory
public getResourcesPath ( ) : string
Résultat string Path to this package's Resources directory

isObjectManagementEnabled() public méthode

Tells if files in the Classes directory should be registered and object management enabled for this package.
public isObjectManagementEnabled ( ) : boolean
Résultat boolean

isPathAutoloadEntryPoint() protected méthode

protected isPathAutoloadEntryPoint ( string $path ) : boolean
$path string
Résultat boolean

isProtected() public méthode

Tells if this package is protected and therefore cannot be deactivated or deleted
public isProtected ( ) : boolean
Résultat boolean

normalizeAutoloadPath() protected méthode

protected normalizeAutoloadPath ( string $autoloadType, string $autoloadNamespace, string $autoloadPath ) : string
$autoloadType string
$autoloadNamespace string
$autoloadPath string
Résultat string

setProtected() public méthode

Sets the protection flag of the package
public setProtected ( boolean $protected ) : void
$protected boolean TRUE if the package should be protected, otherwise FALSE
Résultat void

Property Details

$autoloadConfiguration protected_oe property

protected array $autoloadConfiguration
Résultat array

$autoloadTypes protected_oe property

protected string[] $autoloadTypes
Résultat string[]

$composerName protected_oe property

composer name for this package
protected string $composerName
Résultat string

$flattenedAutoloadConfiguration protected_oe property

protected array $flattenedAutoloadConfiguration
Résultat array

$namespace protected_oe property

The namespace of the classes contained in this package
protected string $namespace
Résultat string

$namespaces protected_oe property

Array of all declared autoload namespaces contained in this package
protected string[] $namespaces
Résultat string[]

$objectManagementEnabled protected_oe property

Disable this flag if you don't need object management for your package and want to save some memory.
protected bool $objectManagementEnabled
Résultat boolean

$packageKey protected_oe property

Unique key of this package. Example for the Flow package: "Neos.Flow"
protected string $packageKey
Résultat string

$packagePath protected_oe property

Full path to this package's main directory
protected string $packagePath
Résultat string

$protected protected_oe property

If this package is protected and therefore cannot be deactivated or deleted
protected bool $protected
Résultat boolean