PHP 클래스 Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher

저자: Fabien Potencier ([email protected])
저자: Bernhard Schussek ([email protected])
상속: extends Symfony\Component\EventDispatcher\EventDispatcher
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

공개 메소드들

메소드 설명
__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