Zend\EventManager\SharedEventManager
Shared/contextual EventManager
Allows attaching to EMs composed by other classes without having an instance first.
The assumption is that the SharedEventManager will be injected into EventManager
instances, and then queried for additional listeners when triggering an event.
Synopsis
class SharedEventManager
implements
SharedEventAggregateAwareInterface,SharedEventManagerInterface
{
- // members
- protected array $identifiers;
- // methods
- public CallbackHandler|array attach()
- public mixed attachAggregate()
- public bool detach()
- public mixed detachAggregate()
- public array getEvents()
- public false|PriorityQueue getListeners()
- public bool clearListeners()
Hierarchy
Extended by
Implements
Members
protected
- $identifiers
—
array
Identifiers with event connections
Methods
public
- attach() — Attach a listener to an event
- attachAggregate() — Attach a listener aggregate
- clearListeners() — Clear all listeners for a given identifier, optionally for a specific event
- detach() — Detach a listener from an event offered by a given resource
- detachAggregate() — Detach a listener aggregate
- getEvents() — Retrieve all registered events for a given resource
- getListeners() — Retrieve all listeners for a given identifier and event