PHP Класс Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher

Автор: Fabien Potencier ([email protected])
Автор: Bernhard Schussek ([email protected])
Наследование: extends Symfony\Component\EventDispatcher\EventDispatcher
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Symfony\Component\DependencyInjection\ContainerInterface $container ) Constructor.
addListenerService ( string $eventName, array $callback, integer $priority ) Adds a service as event listener
dispatch ( $eventName, Symfony\Component\EventDispatcher\Event $event = null ) {@inheritDoc}

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Symfony\Component\DependencyInjection\ContainerInterface $container )
$container Symfony\Component\DependencyInjection\ContainerInterface A ContainerInterface instance

addListenerService() публичный Метод

Adds a service as event listener
public addListenerService ( string $eventName, array $callback, integer $priority )
$eventName string Event for which the listener is added
$callback array The service ID of the listener service & the method name that has to be called
$priority integer The higher this value, the earlier an event listener will be triggered in the chain. Defaults to 0.

dispatch() публичный Метод

Lazily loads listeners for this event from the dependency injection container.
public dispatch ( $eventName, Symfony\Component\EventDispatcher\Event $event = null )
$event Symfony\Component\EventDispatcher\Event