Fully Qualified Name: | Laminas\ModuleManager\ModuleManager |
Implements: | ModuleManagerInterface |
Module manager
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | ModuleManager |
getEvent() | Get the module event | ModuleManager |
getEventManager() | Retrieve the event manager | ModuleManager |
getLoadedModules() | Get an array of the loaded modules. | ModuleManager |
getModule() | Get an instance of a module class by the module name | ModuleManager |
getModules() | Get the array of module names that this manager should load. | ModuleManager |
loadModule() | Load a specific module by name. | ModuleManager |
loadModules() | Load the provided modules. | ModuleManager |
onLoadModules() | Handle the loadModules event | ModuleManager |
setEvent() | Set the module event | ModuleManager |
setEventManager() | Set the event manager instance used by this module manager. | ModuleManager |
setModules() | Set an array or Traversable of module names that this module manager should load. | ModuleManager |
Constructor
Parameter Name | Type | Description |
---|---|---|
$modules | array|\Traversable | |
$eventManager | \EventManagerInterface |
Returns:
Get the module event
Returns: \ModuleEvent
Retrieve the event manager
Lazy-loads an EventManager instance if none registered.
Returns: \EventManagerInterface
Get an array of the loaded modules.
Parameter Name | Type | Description |
---|---|---|
$loadModules | bool | If |
Returns: array An array of Module objects, keyed by module name
Get an instance of a module class by the module name
Parameter Name | Type | Description |
---|---|---|
$moduleName | string |
Returns: mixed
Get the array of module names that this manager should load.
Returns: array
Load a specific module by name.
Parameter Name | Type | Description |
---|---|---|
$module | string|array |
Returns: mixed Module's Module class
Load the provided modules.
Returns: \ModuleManager
Handle the loadModules event
Returns: void
Set the module event
Parameter Name | Type | Description |
---|---|---|
$event | \ModuleEvent |
Returns: \ModuleManager
Set the event manager instance used by this module manager.
Parameter Name | Type | Description |
---|---|---|
$events | \EventManagerInterface |
Returns: \ModuleManager
Set an array or Traversable of module names that this module manager should load.
Parameter Name | Type | Description |
---|---|---|
$modules | mixed | array |
Returns: \ModuleManager