Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • ContainerAwareEventDispatcher
  • Event
  • EventDispatcher
  • GenericEvent
  • ImmutableEventDispatcher

Interfaces

  • EventDispatcherInterface
  • EventSubscriberInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class EventDispatcher

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.

Symfony\Component\EventDispatcher\EventDispatcher implements Symfony\Component\EventDispatcher\EventDispatcherInterface

Direct known subclasses

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher
Namespace: Symfony\Component\EventDispatcher
Author: Guilherme Blanco guilhermeblanco@hotmail.com
Author: Jonathan Wage jonwage@gmail.com
Author: Roman Borschel roman@code-factory.org
Author: Bernhard Schussek bschussek@gmail.com
Author: Fabien Potencier fabien@symfony.com
Author: Jordi Boggiano j.boggiano@seld.be
Author: Jordan Alliot jordan.alliot@gmail.com
Api
Located at EventDispatcher.php
Methods summary
public Symfony\Component\EventDispatcher\Event
# dispatch( string $eventName, Symfony\Component\EventDispatcher\Event $event = null )

Parameters

$eventName

The name of the event to dispatch. The name of the event is the name of the method that is invoked on listeners.

$event

The event to pass to the event handlers/listeners. If not supplied, an empty Event instance is created.

Returns

Symfony\Component\EventDispatcher\Event

See

Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()

Api

Implementation of

Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()
public array
# getListeners( string $eventName = null )

Parameters

$eventName
The name of the event

Returns

array
The event listeners for the specified event, or all event listeners by event name

See

Symfony\Component\EventDispatcher\EventDispatcherInterface::getListeners()

Implementation of

Symfony\Component\EventDispatcher\EventDispatcherInterface::getListeners()
public boolean
# hasListeners( string $eventName = null )

Parameters

$eventName
The name of the event

Returns

boolean
true if the specified event has any listeners, false otherwise

See

Symfony\Component\EventDispatcher\EventDispatcherInterface::hasListeners()

Implementation of

Symfony\Component\EventDispatcher\EventDispatcherInterface::hasListeners()
public
# addListener( string $eventName, callable $listener, integer $priority = 0 )

Parameters

$eventName
The event to listen on
$listener
The listener
$priority

The higher this value, the earlier an event listener will be triggered in the chain (defaults to 0)

See

Symfony\Component\EventDispatcher\EventDispatcherInterface::addListener()

Api

Implementation of

Symfony\Component\EventDispatcher\EventDispatcherInterface::addListener()
public
# removeListener( string $eventName, callable $listener )

Parameters

$eventName
The event to remove a listener from
$listener
The listener to remove

See

Symfony\Component\EventDispatcher\EventDispatcherInterface::removeListener()

Implementation of

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

Parameters

$subscriber
The subscriber.

See

Symfony\Component\EventDispatcher\EventDispatcherInterface::addSubscriber()

Api

Implementation of

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

Parameters

$subscriber
The subscriber

See

Symfony\Component\EventDispatcher\EventDispatcherInterface::removeSubscriber()

Implementation of

Symfony\Component\EventDispatcher\EventDispatcherInterface::removeSubscriber()
protected
# doDispatch( callable[] $listeners, string $eventName, Symfony\Component\EventDispatcher\Event $event )

Triggers the listeners of an event.

Triggers the listeners of an event.

This method can be overridden to add functionality that is executed for each listener.

Parameters

$listeners
The event listeners.
$eventName
The name of the event to dispatch.
$event
The event object to pass to the event handlers/listeners.
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen