Class ModuleManager

Summary

Fully Qualified Name: Zend\ModuleManager\ModuleManager
Implements: ModuleManagerInterface

Description

Module manager

Methods

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

Method Details

__construct()

Constructor

Parameter Name Type Description
$modules array|\Traversable
$eventManager \EventManagerInterface

Returns:

getEvent()

Get the module event

Returns: \ModuleEvent

getEventManager()

Retrieve the event manager

Lazy-loads an EventManager instance if none registered.

Returns: \EventManagerInterface

getLoadedModules()

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

getModule()

Get an instance of a module class by the module name

Parameter Name Type Description
$moduleName string

Returns: mixed

getModules()

Get the array of module names that this manager should load.

Returns: array

loadModule()

Load a specific module by name.

Parameter Name Type Description
$module string|array

Returns: mixed Module's Module class

loadModules()

Load the provided modules.

Returns: \ModuleManager

onLoadModules()

Handle the loadModules event

Returns: void

setEvent()

Set the module event

Parameter Name Type Description
$event \ModuleEvent

Returns: \ModuleManager

setEventManager()

Set the event manager instance used by this module manager.

Parameter Name Type Description
$events \EventManagerInterface

Returns: \ModuleManager

setModules()

Set an array or Traversable of module names that this module manager should load.

Parameter Name Type Description
$modules mixed array

Returns: \ModuleManager

Top