Open Monograph Press  3.3.0
Symfony\Component\EventDispatcher\EventDispatcherInterface Interface Reference
Inheritance diagram for Symfony\Component\EventDispatcher\EventDispatcherInterface:
Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface Symfony\Component\EventDispatcher\EventDispatcher Symfony\Component\EventDispatcher\ImmutableEventDispatcher Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher

Public Member Functions

 addListener ($eventName, $listener, $priority=0)
 
 addListener ($eventName, $listener, $priority=0)
 
 addSubscriber (EventSubscriberInterface $subscriber)
 
 addSubscriber (EventSubscriberInterface $subscriber)
 
 dispatch ($eventName, Event $event=null)
 
 dispatch ($eventName, Event $event=null)
 
 getListeners ($eventName=null)
 
 getListeners ($eventName=null)
 
 hasListeners ($eventName=null)
 
 hasListeners ($eventName=null)
 
 removeListener ($eventName, $listener)
 
 removeListener ($eventName, $listener)
 
 removeSubscriber (EventSubscriberInterface $subscriber)
 
 removeSubscriber (EventSubscriberInterface $subscriber)
 

Detailed Description

The EventDispatcherInterface is the central point of Symfony's event listener system. Listeners are registered on the manager and events are dispatched through the manager.

Author
Bernhard Schussek bschu.nosp@m.ssek.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition at line 21 of file lib/vendor/symfony/event-dispatcher/EventDispatcherInterface.php.

Member Function Documentation

◆ addListener() [1/2]

Symfony\Component\EventDispatcher\EventDispatcherInterface::addListener (   $eventName,
  $listener,
  $priority = 0 
)

Adds an event listener that listens on the specified events.

Parameters
string$eventNameThe event to listen on
callable$listenerThe listener
int$priorityThe higher this value, the earlier an event listener will be triggered in the chain (defaults to 0)

Implemented in Symfony\Component\EventDispatcher\EventDispatcher, Symfony\Component\EventDispatcher\EventDispatcher, Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher, Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher, Symfony\Component\EventDispatcher\ImmutableEventDispatcher, and Symfony\Component\EventDispatcher\ImmutableEventDispatcher.

◆ addListener() [2/2]

Symfony\Component\EventDispatcher\EventDispatcherInterface::addListener (   $eventName,
  $listener,
  $priority = 0 
)

Adds an event listener that listens on the specified events.

Parameters
string$eventNameThe event to listen on
callable$listenerThe listener
int$priorityThe higher this value, the earlier an event listener will be triggered in the chain (defaults to 0)

Implemented in Symfony\Component\EventDispatcher\EventDispatcher, Symfony\Component\EventDispatcher\EventDispatcher, Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher, Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher, Symfony\Component\EventDispatcher\ImmutableEventDispatcher, and Symfony\Component\EventDispatcher\ImmutableEventDispatcher.

◆ addSubscriber() [1/2]

Symfony\Component\EventDispatcher\EventDispatcherInterface::addSubscriber ( EventSubscriberInterface  $subscriber)

◆ addSubscriber() [2/2]

Symfony\Component\EventDispatcher\EventDispatcherInterface::addSubscriber ( EventSubscriberInterface  $subscriber)

◆ dispatch() [1/2]

Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch (   $eventName,
Event  $event = null 
)

Dispatches an event to all registered listeners.

Parameters
string$eventNameThe name of the event to dispatch. The name of the event is the name of the method that is invoked on listeners.
Event$eventThe event to pass to the event handlers/listeners If not supplied, an empty Event instance is created
Returns
Event

Implemented in Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher, Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher, Symfony\Component\EventDispatcher\EventDispatcher, Symfony\Component\EventDispatcher\EventDispatcher, Symfony\Component\EventDispatcher\ImmutableEventDispatcher, and Symfony\Component\EventDispatcher\ImmutableEventDispatcher.

◆ dispatch() [2/2]

Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch (   $eventName,
Event  $event = null 
)

Dispatches an event to all registered listeners.

Parameters
string$eventNameThe name of the event to dispatch. The name of the event is the name of the method that is invoked on listeners.
Event$eventThe event to pass to the event handlers/listeners If not supplied, an empty Event instance is created
Returns
Event

Implemented in Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher, Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher, Symfony\Component\EventDispatcher\EventDispatcher, Symfony\Component\EventDispatcher\EventDispatcher, Symfony\Component\EventDispatcher\ImmutableEventDispatcher, and Symfony\Component\EventDispatcher\ImmutableEventDispatcher.

◆ getListeners() [1/2]

Symfony\Component\EventDispatcher\EventDispatcherInterface::getListeners (   $eventName = null)

◆ getListeners() [2/2]

Symfony\Component\EventDispatcher\EventDispatcherInterface::getListeners (   $eventName = null)

◆ hasListeners() [1/2]

◆ hasListeners() [2/2]

◆ removeListener() [1/2]

◆ removeListener() [2/2]

◆ removeSubscriber() [1/2]

◆ removeSubscriber() [2/2]


The documentation for this interface was generated from the following file: