PackageInitializationEvent
FinalYes
Event that is triggered after a package has been activated (or required in composer mode), allowing listeners to execute initialization tasks, such as importing static data.
Table of Contents
Methods
- __construct() : mixed
- addStorageEntry() : void
- getContainer() : ContainerInterface|null
- getEmitter() : object|null
- getExtensionKey() : string
- getPackage() : PackageInterface
- getStorageEntry() : PackageInitializationResult
- hasStorageEntry() : bool
- removeStorageEntry() : void
Methods
__construct()
public
__construct(string $extensionKey, PackageInterface $package[, ContainerInterface|null $container = null ][, object|null $emitter = null ][, array<string|int, PackageInitializationResult> $storage = [] ]) : mixed
Parameters
- $extensionKey : string
- $package : PackageInterface
- $container : ContainerInterface|null = null
- $emitter : object|null = null
- $storage : array<string|int, PackageInitializationResult> = []
addStorageEntry()
public
addStorageEntry(string $identifier, mixed $data) : void
Parameters
- $identifier : string
- $data : mixed
getContainer()
public
getContainer() : ContainerInterface|null
Return values
ContainerInterface|nullgetEmitter()
public
getEmitter() : object|null
Return values
object|nullgetExtensionKey()
public
getExtensionKey() : string
Return values
stringgetPackage()
public
getPackage() : PackageInterface
Return values
PackageInterfacegetStorageEntry()
public
getStorageEntry(string $identifier) : PackageInitializationResult
Parameters
- $identifier : string
Return values
PackageInitializationResulthasStorageEntry()
public
hasStorageEntry(string $identifier) : bool
Parameters
- $identifier : string
Return values
boolremoveStorageEntry()
public
removeStorageEntry(string $identifier) : void
Parameters
- $identifier : string