Zend\EventManager\EventManager
Event manager: notification system
Use the EventManager when you want to create a per-instance notification
system for your objects.
Synopsis
class EventManager
implements
EventManagerInterface
{
- // members
- protected array $events;
- protected string $eventClass;
- protected array $identifiers;
- protected false|null|SharedEventManagerInterface $sharedManager;
- // methods
- public void __construct()
- public EventManager setEventClass()
- public EventManager setSharedManager()
- public void unsetSharedManager()
- public false|SharedEventManagerInterface getSharedManager()
- public array getIdentifiers()
- public EventManager setIdentifiers()
- public EventManager addIdentifiers()
- public ResponseCollection trigger()
- public ResponseCollection triggerUntil()
- public CallbackHandler|mixed attach()
- public mixed attachAggregate()
- public bool detach()
- public mixed detachAggregate()
- public array getEvents()
- public PriorityQueue getListeners()
- public void clearListeners()
- public ArrayObject prepareArgs()
- protected ResponseCollection triggerListeners()
- protected array getSharedListeners()
- protected void insertListeners()
Hierarchy
Members
protected
- $eventClass — string
- $events
—
array
Subscribed events and their listeners - $identifiers
—
array
Identifiers, used to pull shared signals from SharedEventManagerInterface instance
Methods
protected
- insertListeners() — Add listeners to the master queue of listeners
- triggerListeners() — Trigger listeners
public
- __construct() — Constructor
- addIdentifiers() — Add some identifier(s) (appends to any currently set identifiers)
- attach() — Attach a listener to an event
- attachAggregate() — Attach a listener aggregate
- clearListeners() — Clear all listeners for a given event
- detach() — Unsubscribe a listener from an event
- detachAggregate() — Detach a listener aggregate
- getEvents() — Retrieve all registered events
- getIdentifiers() — Get the identifier(s) for this EventManager
- getListeners() — Retrieve all listeners for a given event
- prepareArgs() — Prepare arguments
- setEventClass() — Set the event class to utilize
- setIdentifiers() — Set the identifiers (overrides any currently set identifiers)
- trigger() — Trigger all listeners for a given event
- triggerUntil() — Trigger listeners until return value of one causes a callback to evaluate to true