Custom event for use with module manager Composes Module objects

Encapsulates the target context and parameters passed, and provides some behavior for interacting with the event manager.

package Default
inherited_from \Zend\EventManager\Event

 Methods

Constructor

__construct(string $name = null, string|object $target = null, array|\ArrayAccess $params = null
Inherited

Accept a target and its parameters.

Parameters

$name

string

Event name

$target

stringobject

$params

array\ArrayAccess

Get the config listener

getConfigListener() : null | \Zend\ModuleManager\Listener\ConfigMergerInterface

Returns

null\Zend\ModuleManager\Listener\ConfigMergerInterface

Get module object

getModule() : null | object

Returns

nullobject

Get the name of a given module

getModuleName() : string

Returns

string

Get event name

getName() : string
Inherited
inherited_from \Zend\EventManager\EventInterface::getName()

Returns

string

Get an individual parameter

getParam(string|integer $name, mixed $default = null) : mixed
Inherited

If the parameter does not exist, the $default value will be returned.

inherited_from \Zend\EventManager\EventInterface::getParam()

Parameters

$name

stringinteger

$default

mixed

Returns

mixed

Get all parameters

getParams() : array | object | \ArrayAccess
Inherited
inherited_from \Zend\EventManager\EventInterface::getParams()

Returns

arrayobject\ArrayAccess

Get the event target

getTarget() : string | object
Inherited

This may be either an object, or the name of a static method.

inherited_from \Zend\EventManager\EventInterface::getTarget()

Returns

stringobject

Is propagation stopped?

propagationIsStopped() : boolean
Inherited
inherited_from \Zend\EventManager\EventInterface::propagationIsStopped()

Returns

boolean

Set module object to compose in this event

setConfigListener(\Zend\ModuleManager\Listener\ConfigMergerInterface $configListener) : \Zend\ModuleManager\ModuleEvent

Parameters

$configListener

\Zend\ModuleManager\Listener\ConfigMergerInterface

Returns

\Zend\ModuleManager\ModuleEvent

Set module object to compose in this event

setModule(object $module) : \Zend\ModuleManager\ModuleEvent

Parameters

$module

object

Exceptions

\Zend\ModuleManager\Exception\InvalidArgumentException

Returns

\Zend\ModuleManager\ModuleEvent

Set the name of a given module

setModuleName(string $moduleName) : \Zend\ModuleManager\ModuleEvent

Parameters

$moduleName

string

Exceptions

\Zend\ModuleManager\Exception\InvalidArgumentException

Returns

\Zend\ModuleManager\ModuleEvent

Set the event name

setName(string $name) : \Zend\EventManager\Event
Inherited
inherited_from \Zend\EventManager\EventInterface::setName()

Parameters

$name

string

Returns

\Zend\EventManager\Event

Set an individual parameter to a value

setParam(string|integer $name, mixed $value) : \Zend\EventManager\Event
Inherited
inherited_from \Zend\EventManager\EventInterface::setParam()

Parameters

$name

stringinteger

$value

mixed

Returns

\Zend\EventManager\Event

Set parameters

setParams(array|\ArrayAccess|object $params) : \Zend\EventManager\Event
Inherited

Overwrites parameters

inherited_from \Zend\EventManager\EventInterface::setParams()

Parameters

$params

array\ArrayAccessobject

Exceptions

\Zend\EventManager\Exception\InvalidArgumentException

Returns

\Zend\EventManager\Event

Set the event target/context

setTarget(null|string|object $target) : \Zend\EventManager\Event
Inherited
inherited_from \Zend\EventManager\EventInterface::setTarget()

Parameters

$target

nullstringobject

Returns

\Zend\EventManager\Event

Stop further event propagation

stopPropagation(boolean $flag = true) : void
Inherited
inherited_from \Zend\EventManager\EventInterface::stopPropagation()

Parameters

$flag

boolean

 Properties

 

$configListener

$configListener : \Zend\ModuleManager\Listener\ConfigMergerInterface

Default

 

$module

$module : mixed

Default

 

$moduleName

$moduleName : string

Default

 

Event name

$name : string

Default

 

The event parameters

$params : array | \ArrayAccess | object

Default

array()
 

Whether or not to stop propagation

$stopPropagation : boolean

Default

false
 

The event target

$target : string | object

Default

 Constants

 

EVENT_LOAD_MODULE

EVENT_LOAD_MODULE = 'loadModule' 
 

EVENT_LOAD_MODULES

EVENT_LOAD_MODULES = 'loadModules' 
 

EVENT_LOAD_MODULES_POST

EVENT_LOAD_MODULES_POST = 'loadModules.post' 
 

EVENT_LOAD_MODULE_RESOLVE

EVENT_LOAD_MODULE_RESOLVE = 'loadModule.resolve' 
 

Module events triggered by eventmanager

EVENT_MERGE_CONFIG = 'mergeConfig'