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 ContainerAwareEventDispatcher

Lazily loads listeners and subscribers from the dependency injection container.

Symfony\Component\EventDispatcher\EventDispatcher implements Symfony\Component\EventDispatcher\EventDispatcherInterface
Extended by Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher
Namespace: Symfony\Component\EventDispatcher
Author: Fabien Potencier fabien@symfony.com
Author: Bernhard Schussek bschussek@gmail.com
Author: Jordan Alliot jordan.alliot@gmail.com
Located at ContainerAwareEventDispatcher.php
Methods summary
public
# __construct( Symfony\Component\DependencyInjection\ContainerInterface $container )

Constructor.

Constructor.

Parameters

$container
A ContainerInterface instance
public
# addListenerService( string $eventName, array $callback, integer $priority = 0 )

Adds a service as event listener.

Adds a service as event listener.

Parameters

$eventName
Event for which the listener is added
$callback

The service ID of the listener service & the method name that has to be called

$priority

The higher this value, the earlier an event listener will be triggered in the chain. Defaults to 0.

Throws

InvalidArgumentException
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()

Overrides

Symfony\Component\EventDispatcher\EventDispatcher::removeListener()
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()

Overrides

Symfony\Component\EventDispatcher\EventDispatcher::hasListeners()
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()

Overrides

Symfony\Component\EventDispatcher\EventDispatcher::getListeners()
public
# addSubscriberService( string $serviceId, string $class )

Adds a service as event subscriber.

Adds a service as event subscriber.

Parameters

$serviceId
The service ID of the subscriber service
$class
The service's class name (which must implement EventSubscriberInterface)
public Symfony\Component\EventDispatcher\Event
# dispatch( string $eventName, Symfony\Component\EventDispatcher\Event $event = null )

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

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

Throws

InvalidArgumentException
if the service is not defined

Overrides

Symfony\Component\EventDispatcher\EventDispatcher::dispatch()
public
# getContainer( )
protected
# lazyLoad( string $eventName )

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

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

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.

Methods inherited from Symfony\Component\EventDispatcher\EventDispatcher
addListener(), addSubscriber(), doDispatch(), removeSubscriber()
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen