class Event implements EventInterface

Base event class

Properties

protected string $name Event name
protected array $parameters Event parameters
protected boolean $propagation Event propagation

Methods

__construct(array $params = [])

Constructor

void
setName(string $name)

Set event name

string
getName()

Get event name

void
stopPropagation()

Setop event propagation

bool
isStopped()

Return true if event propagation is disabled

void
setParameter(string $name, mixed $value)

Set event parameter

array
getParameters()

Return event parameters

array
toArray()

Return params array

Collection
toCollection()

Return collection object with event params

mixed
getParameter(string $name, mixed|null $default = null)

Return parameter

boolean
hasParameter(string $name)

Return true if parameter exist

Details

at line 46
__construct(array $params = [])

Constructor

Parameters

array $params

at line 57
void setName(string $name)

Set event name

Parameters

string $name

Return Value

void

at line 67
string getName()

Get event name

Return Value

string

at line 77
void stopPropagation()

Setop event propagation

Return Value

void

at line 87
bool isStopped()

Return true if event propagation is disabled

Return Value

bool

at line 99
void setParameter(string $name, mixed $value)

Set event parameter

Parameters

string $name
mixed $value

Return Value

void

at line 109
array getParameters()

Return event parameters

Return Value

array

at line 119
array toArray()

Return params array

Return Value

array

at line 132
Collection toCollection()

Return collection object with event params

Return Value

Collection

at line 144
mixed getParameter(string $name, mixed|null $default = null)

Return parameter

Parameters

string $name
mixed|null $default

Return Value

mixed

at line 155
boolean hasParameter(string $name)

Return true if parameter exist

Parameters

string $name

Return Value

boolean