Zend Framework
3.0
|
Module manager. More...
Public Member Functions | |
__construct ($modules, EventManagerInterface $eventManager=null) | |
Constructor. | |
onLoadModules () | |
Handle the loadModules event. | |
loadModules () | |
Load the provided modules. | |
loadModule ($module) | |
Load a specific module by name. | |
getLoadedModules ($loadModules=false) | |
Get an array of the loaded modules. | |
getModule ($moduleName) | |
Get an instance of a module class by the module name. | |
getModules () | |
Get the array of module names that this manager should load. | |
setModules ($modules) | |
Set an array or Traversable of module names that this module manager should load. | |
getEvent () | |
Get the module event. | |
setEvent (ModuleEvent $event) | |
Set the module event. | |
setEventManager (EventManagerInterface $events) | |
Set the event manager instance used by this module manager. | |
getEventManager () | |
Retrieve the event manager. | |
Public Attributes | |
const | EVENT_BOOTSTRAP = 'bootstrap' |
#@+ Reference to Zend::EVENT_BOOTSTRAP | |
Protected Member Functions | |
loadModuleByName (ModuleEvent $event) | |
Load a module with the name. | |
attachDefaultListeners ($events) | |
Register the default event listeners. | |
Protected Attributes | |
$loadedModules = [] | |
$events | |
$event | |
$loadFinished | |
$modules = [] | |
$modulesAreLoaded = false | |
Module manager.
__construct | ( | $modules, | |
EventManagerInterface | $eventManager = null |
||
) |
Constructor.
array | Traversable | $modules | |
EventManagerInterface | $eventManager |
|
protected |
getEvent | ( | ) |
Get the module event.
getEventManager | ( | ) |
Retrieve the event manager.
Lazy-loads an EventManager instance if none registered.
Implements EventsCapableInterface.
getLoadedModules | ( | $loadModules = false | ) |
Get an array of the loaded modules.
bool | $loadModules | If true, load modules if they're not already |
Implements ModuleManagerInterface.
getModule | ( | $moduleName | ) |
Get an instance of a module class by the module name.
string | $moduleName |
getModules | ( | ) |
Get the array of module names that this manager should load.
Implements ModuleManagerInterface.
loadModule | ( | $module | ) |
Load a specific module by name.
string | array | $module |
Exception\RuntimeException | loadModule.resolve loadModule |
Implements ModuleManagerInterface.
|
protected |
Load a module with the name.
ModuleEvent | $event |
Exception\RuntimeException |
loadModules | ( | ) |
Load the provided modules.
loadModules loadModules.post
Having a dedicated .post event abstracts the complexity of priorities from the user. Users can attach to the .post event and be sure that important things like config merging are complete without having to worry if they set a low enough priority.
Implements ModuleManagerInterface.
onLoadModules | ( | ) |
Handle the loadModules event.
setEvent | ( | ModuleEvent | $event | ) |
setEventManager | ( | EventManagerInterface | $events | ) |
Set the event manager instance used by this module manager.
EventManagerInterface | $events |
Implements EventManagerAwareInterface.
setModules | ( | $modules | ) |
Set an array or Traversable of module names that this module manager should load.
mixed | $modules | array or Traversable of module names |
Exception\InvalidArgumentException |
Implements ModuleManagerInterface.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const EVENT_BOOTSTRAP = 'bootstrap' |
#@+ Reference to Zend::EVENT_BOOTSTRAP