class Event implements EventInterface

事件原型

Constants

DELIMITER

事件名称分隔符

Methods

__construct(string $name, string|object $target = null, mixed $data = null)

Event constructor.

string
getName()

Get event name

object|string|null
getTarget()

Get target/context from which event was triggered

mixed
getData()

Get parameters passed to the event

setName(string $name)

Set the event name

setTarget(object|string $target)

Set the event target

setData(array $data)

Set event data

stopPropagation()

Indicate whether or not to stop propagating this event

bool
isPropagationStopped()

Has this event indicated event propagation should stop?

Details

at line 54
__construct(string $name, string|object $target = null, mixed $data = null)

Event constructor.

Parameters

string $name
string|object $target
mixed $data

at line 61
string getName()

Get event name

Return Value

string

at line 66
object|string|null getTarget()

Get target/context from which event was triggered

Return Value

object|string|null

at line 71
mixed getData()

Get parameters passed to the event

Return Value

mixed

at line 76
setName(string $name)

Set the event name

Parameters

string $name

at line 84
setTarget(object|string $target)

Set the event target

Parameters

object|string $target

at line 89
setData(array $data)

Set event data

Parameters

array $data

at line 94
stopPropagation()

Indicate whether or not to stop propagating this event

at line 99
bool isPropagationStopped()

Has this event indicated event propagation should stop?

Return Value

bool