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

Interface EventDispatcherInterface

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.

Direct known implementers

Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface, Symfony\Component\EventDispatcher\EventDispatcher, Symfony\Component\EventDispatcher\ImmutableEventDispatcher

Indirect known implementers

Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher, Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher
Namespace: Symfony\Component\EventDispatcher
Author: Bernhard Schussek bschussek@gmail.com
Api
Located at EventDispatcherInterface.php
Methods summary
public Symfony\Component\EventDispatcher\Event
# dispatch( string $eventName, Symfony\Component\EventDispatcher\Event $event = null )

Dispatches an event to all registered listeners.

Dispatches an event to all registered listeners.

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

Api

public
# addListener( string $eventName, callable $listener, integer $priority = 0 )

Adds an event listener that listens on the specified events.

Adds an event listener that listens on the specified events.

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)

Api

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

Adds an event subscriber.

Adds an event subscriber.

The subscriber is asked for all the events he is interested in and added as a listener for these events.

Parameters

$subscriber
The subscriber.

Api

public
# removeListener( string $eventName, callable $listener )

Removes an event listener from the specified events.

Removes an event listener from the specified events.

Parameters

$eventName
The event to remove a listener from
$listener
The listener to remove
public
# removeSubscriber( Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber )

Removes an event subscriber.

Removes an event subscriber.

Parameters

$subscriber
The subscriber
public array
# getListeners( string $eventName = null )

Gets the listeners of a specific event or all listeners.

Gets the listeners of a specific event or all listeners.

Parameters

$eventName
The name of the event

Returns

array
The event listeners for the specified event, or all event listeners by event name
public boolean
# hasListeners( string $eventName = null )

Checks whether an event has any registered listeners.

Checks whether an event has any registered listeners.

Parameters

$eventName
The name of the event

Returns

boolean
true if the specified event has any listeners, false otherwise
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen