Module manager

 Methods

Constructor

__construct(array | \Traversable $modules, \Zend\EventManager\EventManagerInterface $eventManager) 

Parameters

$modules

array\Traversable

Get the module event

getEvent() : \Zend\ModuleManager\ModuleEvent

Retrieve the event manager

getEventManager() : \Zend\EventManager\EventManagerInterface

Lazy-loads an EventManager instance if none registered.

Returns

Get an array of the loaded modules.

getLoadedModules(bool $loadModules) : array

Parameters

$loadModules

bool

If true, load modules if they're not already

Returns

arrayAn array of Module objects, keyed by module name

Get an instance of a module class by the module name

getModule(string $moduleName) : mixed

Parameters

$moduleName

string

Returns

mixed

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

getModules() : array

Returns

array

Load a specific module by name.

loadModule(string $moduleName) : mixed

triggers loadModule.resolve
triggers loadModule

Parameters

$moduleName

string

Exceptions

\Zend\ModuleManager\Exception\RuntimeException

Returns

mixedModule's Module class

Load the provided modules.

loadModules() : \Zend\ModuleManager\ModuleManager

triggers loadModules
triggers loadModules.post

Returns

Handle the loadModules event

onLoadModules() : void

Set the module event

setEvent(\Zend\ModuleManager\ModuleEvent $event) : \Zend\ModuleManager\ModuleManager

Set the event manager instance used by this module manager.

setEventManager(\Zend\EventManager\EventManagerInterface $events) : \Zend\ModuleManager\ModuleManager

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

setModules(mixed $modules) : \Zend\ModuleManager\ModuleManager

Parameters

$modules

mixed

array or Traversable of module names

Exceptions

\Zend\ModuleManager\Exception\InvalidArgumentException

Returns

Register the default event listeners

attachDefaultListeners() : \Zend\ModuleManager\ModuleManager

 Properties

     

$loadFinished

$loadFinished : bool

 

<p>An array of Module classes of loaded modules</p>

$loadedModules : array

 

modules

$modules : array | \Traversable

 

True if modules have already been loaded

$modulesAreLoaded : bool