class Event (View source)

The base event class

Properties

protected string $name
protected array $args
protected array $flags

Methods

__construct(string $name, array $args = array(), array $flags = array())

Constructor.

string
getName()

Returns the event's name.

array
getArguments()

Returns the event's arguments.

array
getFlags()

Returns the event's flags.

bool
isPropagationStopped()

Checks if stopPropagation has been called

stopPropagation()

Prevents the event from being passed to further listeners

Details

__construct(string $name, array $args = array(), array $flags = array())

Constructor.

Parameters

string $name The event name
array $args Arguments passed by the user
array $flags Optional flags to pass data not as argument

string getName()

Returns the event's name.

Return Value

string The event name

array getArguments()

Returns the event's arguments.

Return Value

array The event arguments

array getFlags()

Returns the event's flags.

Return Value

array The event flags

bool isPropagationStopped()

Checks if stopPropagation has been called

Return Value

bool Whether propagation has been stopped

stopPropagation()

Prevents the event from being passed to further listeners