NamedEvent

Class
implements StoppableEventInterface
Read only: Yes Final: Yes

Wrap an event object with an explicit dispatch name.

Description

The name defaults to the wrapped event class when no explicit identifier is provided.

Table of Contents

Interfaces

Properties

 : object
$name

Dispatch name associated with the wrapped event.

 : string

Methods

__construct()

Create a named wrapper for the provided event.

 : mixed
getEvent()

Get the original event instance.

 : object
getName()

Get the dispatch name for the wrapped event.

 : string
isPropagationStopped()

Determine whether propagation has been stopped for the wrapped event.

 : bool
Properties

$name

Private

Dispatch name associated with the wrapped event.

private string $name
Methods

__construct()

Public

Create a named wrapper for the provided event.

public __construct( object  $event[, string|null  $name = null]) : mixed
Parameters
$event : object

Description

original event instance

$name : string|null = null

Description

Explicit dispatch name. Defaults to the wrapped event class name.

getEvent()

Public

Get the original event instance.

public getEvent() : object
Return values
object

Description

wrapped event instance

getName()

Public

Get the dispatch name for the wrapped event.

public getName() : string
Return values
string

Description

event name used for listener lookup

isPropagationStopped()

Public

Determine whether propagation has been stopped for the wrapped event.

public isPropagationStopped() : bool
Return values
bool

Description

whether the wrapped event stops propagation