Class EventManager

Summary

Fully Qualified Name: Zend\EventManager\EventManager
Implements: EventManagerInterface

Description

Event manager: notification system

Use the EventManager when you want to create a per-instance notification system for your objects.

Methods

Name Description Defined By
__construct() Constructor EventManager
addIdentifiers() EventManager
attach() EventManager
clearListeners() EventManager
detach() EventManager
getIdentifiers() EventManager
getSharedManager() Retrieve the shared event manager, if composed. EventManager
prepareArgs() Prepare arguments EventManager
setEventPrototype() EventManager
setIdentifiers() EventManager
trigger() EventManager
triggerEvent() EventManager
triggerEventUntil() EventManager
triggerUntil() EventManager

Method Details

__construct()

Constructor

Allows optionally specifying identifier(s) to use to pull signals from a SharedEventManagerInterface.

Parameter Name Type Description
$sharedEventManager \SharedEventManagerInterface
$identifiers array

Returns:

addIdentifiers()

Parameter Name Type Description
$identifiers

Returns:

attach()

Parameter Name Type Description
$eventName
$listener
$priority

Returns:

clearListeners()

Parameter Name Type Description
$eventName

Returns:

detach()

Parameter Name Type Description
$listener
$eventName
$force

Returns:

getIdentifiers()

Returns:

getSharedManager()

Retrieve the shared event manager, if composed.

Returns: null|\SharedEventManagerInterface $sharedEventManager

prepareArgs()

Prepare arguments

Use this method if you want to be able to modify arguments from within a listener. It returns an ArrayObject of the arguments, which may then be passed to trigger().

Parameter Name Type Description
$args array

Returns: \ArrayObject

setEventPrototype()

Parameter Name Type Description
$prototype

Returns:

setIdentifiers()

Parameter Name Type Description
$identifiers

Returns:

trigger()

Parameter Name Type Description
$eventName
$target
$argv

Returns:

triggerEvent()

Parameter Name Type Description
$event

Returns:

triggerEventUntil()

Parameter Name Type Description
$callback
$event

Returns:

triggerUntil()

Parameter Name Type Description
$callback
$eventName
$target
$argv

Returns:

Top