Class Symfony\Component\EventDispatcher\Event

InheritanceSymfony\Component\EventDispatcher\Event
SubclassesGuzzle\Common\Event, Guzzle\Service\Command\CreateResponseClassEvent, Symfony\Component\Console\Event\ConsoleCommandEvent, Symfony\Component\Console\Event\ConsoleEvent, Symfony\Component\Console\Event\ConsoleExceptionEvent, Symfony\Component\Console\Event\ConsoleTerminateEvent, Symfony\Component\EventDispatcher\GenericEvent

Event is the base class for classes containing event data.

This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised.

You can call the method stopPropagation() to abort the execution of further listeners in your event listener.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getDispatcher() Returns the EventDispatcher that dispatches this Event. Symfony\Component\EventDispatcher\Event
getName() Gets the event's name. Symfony\Component\EventDispatcher\Event
isPropagationStopped() Returns whether further event listeners should be triggered. Symfony\Component\EventDispatcher\Event
setDispatcher() Stores the EventDispatcher that dispatches this Event. Symfony\Component\EventDispatcher\Event
setName() Sets the event's name property. Symfony\Component\EventDispatcher\Event
stopPropagation() Stops the propagation of the event to further event listeners. Symfony\Component\EventDispatcher\Event

Method Details

getDispatcher() public method

Returns the EventDispatcher that dispatches this Event.

public Symfony\Component\EventDispatcher\EventDispatcherInterface getDispatcher ( )
getName() public method

Gets the event's name.

public string getName ( )
isPropagationStopped() public method

Returns whether further event listeners should be triggered.

See also Symfony\Component\EventDispatcher\Event::stopPropagation().

public bool isPropagationStopped ( )
return bool

Whether propagation was already stopped for this event

setDispatcher() public method

Stores the EventDispatcher that dispatches this Event.

public void setDispatcher ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher )
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
setName() public method

Sets the event's name property.

public void setName ( $name )
$name string

The event name

stopPropagation() public method

Stops the propagation of the event to further event listeners.

If multiple event listeners are connected to the same event, no further event listener will be triggered once any trigger calls stopPropagation().

public void stopPropagation ( )