Event
in package
implements
EventInterface
Base event class
Table of Contents
Interfaces
- EventInterface
- Event interface
Properties
- $name : string
- Event name
- $parameters : array<string|int, mixed>
- Event parameters
- $propagation : bool
- Event propagation
Methods
- __construct() : mixed
- Constructor
- getName() : string
- Get event name
- getParameter() : mixed|null
- Return parameter
- getParameters() : array<string|int, mixed>
- Return event parameters
- hasParameter() : bool
- Return true if parameter exist
- isStopped() : bool
- Return true if event propagation is disabled
- setName() : void
- Set event name
- setParameter() : void
- Set event parameter
- stopPropagation() : void
- Setop event propagation
- toArray() : array<string|int, mixed>
- Return params array
- toCollection() : Collection
- Return collection object with event params
Properties
$name
Event name
protected
string
$name
$parameters
Event parameters
protected
array<string|int, mixed>
$parameters
= []
$propagation
Event propagation
protected
bool
$propagation
= false
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $params = [] ]) : mixed
Parameters
- $params : array<string|int, mixed> = []
getName()
Get event name
public
getName() : string
Return values
stringgetParameter()
Return parameter
public
getParameter(string $name[, mixed|null $default = null ]) : mixed|null
Parameters
- $name : string
- $default : mixed|null = null
Return values
mixed|nullgetParameters()
Return event parameters
public
getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>hasParameter()
Return true if parameter exist
public
hasParameter(string $name) : bool
Parameters
- $name : string
Return values
boolisStopped()
Return true if event propagation is disabled
public
isStopped() : bool
Return values
boolsetName()
Set event name
public
setName(string $name) : void
Parameters
- $name : string
setParameter()
Set event parameter
public
setParameter(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
stopPropagation()
Setop event propagation
public
stopPropagation() : void
toArray()
Return params array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toCollection()
Return collection object with event params
public
toCollection() : Collection