Open Journal Systems  3.3.0
Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher Class Reference
Inheritance diagram for Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher:
Symfony\Component\EventDispatcher\EventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface

Public Member Functions

 __construct (ContainerInterface $container)
 
 __construct (ContainerInterface $container)
 
 addListenerService ($eventName, $callback, $priority=0)
 
 addListenerService ($eventName, $callback, $priority=0)
 
 addSubscriberService ($serviceId, $class)
 
 addSubscriberService ($serviceId, $class)
 
 getContainer ()
 
 getContainer ()
 
 getListenerPriority ($eventName, $listener)
 
 getListenerPriority ($eventName, $listener)
 
 getListeners ($eventName=null)
 
 getListeners ($eventName=null)
 
 hasListeners ($eventName=null)
 
 hasListeners ($eventName=null)
 
 removeListener ($eventName, $listener)
 
 removeListener ($eventName, $listener)
 
- Public Member Functions inherited from Symfony\Component\EventDispatcher\EventDispatcher
 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)
 
 removeSubscriber (EventSubscriberInterface $subscriber)
 
 removeSubscriber (EventSubscriberInterface $subscriber)
 

Protected Member Functions

 lazyLoad ($eventName)
 
 lazyLoad ($eventName)
 
- Protected Member Functions inherited from Symfony\Component\EventDispatcher\EventDispatcher
 doDispatch ($listeners, $eventName, Event $event)
 
 doDispatch ($listeners, $eventName, Event $event)
 

Detailed Description

Lazily loads listeners and subscribers from the dependency injection container.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
Bernhard Schussek bschu.nosp@m.ssek.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Jordan Alliot jorda.nosp@m.n.al.nosp@m.liot@.nosp@m.gmai.nosp@m.l.com

Definition at line 24 of file lib/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

Constructor & Destructor Documentation

◆ __construct() [1/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::__construct ( ContainerInterface  $container)

◆ __construct() [2/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::__construct ( ContainerInterface  $container)

Member Function Documentation

◆ addListenerService() [1/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::addListenerService (   $eventName,
  $callback,
  $priority = 0 
)

Adds a service as event listener.

Parameters
string$eventNameEvent for which the listener is added
array$callbackThe service ID of the listener service & the method name that has to be called
int$priorityThe higher this value, the earlier an event listener will be triggered in the chain. Defaults to 0.
Exceptions

Definition at line 55 of file lib/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

◆ addListenerService() [2/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::addListenerService (   $eventName,
  $callback,
  $priority = 0 
)

Adds a service as event listener.

Parameters
string$eventNameEvent for which the listener is added
array$callbackThe service ID of the listener service & the method name that has to be called
int$priorityThe higher this value, the earlier an event listener will be triggered in the chain. Defaults to 0.
Exceptions

Definition at line 55 of file vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

◆ addSubscriberService() [1/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::addSubscriberService (   $serviceId,
  $class 
)

Adds a service as event subscriber.

Parameters
string$serviceIdThe service ID of the subscriber service
string$classThe service's class name (which must implement EventSubscriberInterface)

Definition at line 136 of file lib/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

◆ addSubscriberService() [2/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::addSubscriberService (   $serviceId,
  $class 
)

Adds a service as event subscriber.

Parameters
string$serviceIdThe service ID of the subscriber service
string$classThe service's class name (which must implement EventSubscriberInterface)

Definition at line 136 of file vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

◆ getContainer() [1/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::getContainer ( )

◆ getContainer() [2/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::getContainer ( )

◆ getListenerPriority() [1/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::getListenerPriority (   $eventName,
  $listener 
)

{Gets the listener priority for a specific event.Returns null if the event or the listener does not exist.

Parameters
string$eventNameThe name of the event
callable$listenerThe listener
Returns
int|null The event listener priority
}

Reimplemented from Symfony\Component\EventDispatcher\EventDispatcher.

Definition at line 123 of file lib/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

References Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher\lazyLoad().

◆ getListenerPriority() [2/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::getListenerPriority (   $eventName,
  $listener 
)

{Gets the listener priority for a specific event.Returns null if the event or the listener does not exist.

Parameters
string$eventNameThe name of the event
callable$listenerThe listener
Returns
int|null The event listener priority
}

Reimplemented from Symfony\Component\EventDispatcher\EventDispatcher.

Definition at line 123 of file vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

References Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher\lazyLoad().

◆ getListeners() [1/2]

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

{{Gets the listeners of a specific event or all listeners sorted by descending priority.

Parameters
string$eventNameThe name of the event
Returns
array The event listeners for the specified event, or all event listeners by event name
}}

Reimplemented from Symfony\Component\EventDispatcher\EventDispatcher.

Definition at line 107 of file lib/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

References Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher\lazyLoad().

◆ getListeners() [2/2]

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

{{Gets the listeners of a specific event or all listeners sorted by descending priority.

Parameters
string$eventNameThe name of the event
Returns
array The event listeners for the specified event, or all event listeners by event name
}}

Reimplemented from Symfony\Component\EventDispatcher\EventDispatcher.

Definition at line 107 of file vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

References Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher\lazyLoad().

◆ hasListeners() [1/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::hasListeners (   $eventName = null)

{{Checks whether an event has any registered listeners.

Parameters
string$eventNameThe name of the event
Returns
bool true if the specified event has any listeners, false otherwise
}}

Reimplemented from Symfony\Component\EventDispatcher\EventDispatcher.

Definition at line 91 of file vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

◆ hasListeners() [2/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::hasListeners (   $eventName = null)

{{Checks whether an event has any registered listeners.

Parameters
string$eventNameThe name of the event
Returns
bool true if the specified event has any listeners, false otherwise
}}

Reimplemented from Symfony\Component\EventDispatcher\EventDispatcher.

Definition at line 91 of file lib/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

◆ lazyLoad() [1/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::lazyLoad (   $eventName)
protected

Lazily loads listeners for this event from the dependency injection container.

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.

Definition at line 164 of file lib/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

References Symfony\Component\EventDispatcher\EventDispatcher\addListener().

Referenced by Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher\getListenerPriority(), Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher\getListeners(), and Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher\removeListener().

◆ lazyLoad() [2/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::lazyLoad (   $eventName)
protected

Lazily loads listeners for this event from the dependency injection container.

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.

Definition at line 164 of file vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

References Symfony\Component\EventDispatcher\EventDispatcher\addListener().

◆ removeListener() [1/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::removeListener (   $eventName,
  $listener 
)

{{Removes an event listener from the specified events.

Parameters
string$eventNameThe event to remove a listener from
callable$listenerThe listener to remove
}}

Reimplemented from Symfony\Component\EventDispatcher\EventDispatcher.

Definition at line 64 of file lib/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

References Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher\lazyLoad().

◆ removeListener() [2/2]

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::removeListener (   $eventName,
  $listener 
)

{{Removes an event listener from the specified events.

Parameters
string$eventNameThe event to remove a listener from
callable$listenerThe listener to remove
}}

Reimplemented from Symfony\Component\EventDispatcher\EventDispatcher.

Definition at line 64 of file vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php.

References Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher\lazyLoad().


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