\Symfony\Component\EventDispatcherGenericEvent

Event encapsulation class.

Encapsulates events thus decoupling the observer from the subject they encapsulate.

Summary

Methods
Properties
Constants
isPropagationStopped()
stopPropagation()
__construct()
getSubject()
getArgument()
setArgument()
getArguments()
setArguments()
hasArgument()
offsetGet()
offsetSet()
offsetUnset()
offsetExists()
getIterator()
No public properties found
No constants found
No protected methods found
$subject
$arguments
N/A
No private methods found
$propagationStopped
N/A

Properties

$subject

$subject : 

Type

$arguments

$arguments : 

Type

$propagationStopped

$propagationStopped : 

Type

Methods

isPropagationStopped()

isPropagationStopped() : boolean

Is propagation stopped?

This will typically only be used by the Dispatcher to determine if the previous listener halted propagation.

Returns

boolean —

True if the Event is complete and no further listeners should be called. False to continue calling listeners.

stopPropagation()

stopPropagation() 

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

__construct()

__construct(mixed  $subject = null, array  $arguments = array()) 

Encapsulate an event with $subject and $args.

Parameters

mixed $subject

The subject of the event, usually an object or a callable

array $arguments

Arguments to store in the event

getSubject()

getSubject() : mixed

Getter for subject property.

Returns

mixed —

The observer subject

getArgument()

getArgument(\Symfony\Component\EventDispatcher\string  $key) : mixed

Get argument by key.

Parameters

\Symfony\Component\EventDispatcher\string $key

Throws

\InvalidArgumentException

if key is not found

Returns

mixed —

Contents of array key

setArgument()

setArgument(\Symfony\Component\EventDispatcher\string  $key, mixed  $value) : $this

Add argument to event.

Parameters

\Symfony\Component\EventDispatcher\string $key
mixed $value

Value

Returns

$this

getArguments()

getArguments() : array

Getter for all arguments.

Returns

array

setArguments()

setArguments(array  $args = array()) : $this

Set args property.

Parameters

array $args

Returns

$this

hasArgument()

hasArgument(\Symfony\Component\EventDispatcher\string  $key) : boolean

Has argument.

Parameters

\Symfony\Component\EventDispatcher\string $key

Returns

boolean

offsetGet()

offsetGet(string  $key) : mixed

ArrayAccess for argument getter.

Parameters

string $key

Array key

Throws

\InvalidArgumentException

if key does not exist in $this->args

Returns

mixed

offsetSet()

offsetSet(string  $key, mixed  $value) 

ArrayAccess for argument setter.

Parameters

string $key

Array key to set

mixed $value

Value

offsetUnset()

offsetUnset(string  $key) 

ArrayAccess for unset argument.

Parameters

string $key

Array key

offsetExists()

offsetExists(string  $key) : boolean

ArrayAccess has argument.

Parameters

string $key

Array key

Returns

boolean

getIterator()

getIterator() : \ArrayIterator

IteratorAggregate for iterating over the object like an array.

Returns

\ArrayIterator