Skip to content

NamedEvent

github-actions edited this page Apr 6, 2026 · 1 revision

Wrap an event object with an explicit dispatch name.

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


  • Full name: \FastForward\EventDispatcher\Event\NamedEvent
  • This class is marked as final and can't be subclassed
  • This class implements: StoppableEventInterface
  • This class is a Final class

Methods

__construct

Create a named wrapper for the provided event.

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

Parameters:

Parameter Type Description
$event object original event instance
$name string|null Explicit dispatch name. Defaults to the wrapped event class name.

getName

Get the dispatch name for the wrapped event.

public getName(): string

Return Value:

event name used for listener lookup


getEvent

Get the original event instance.

public getEvent(): object

Return Value:

wrapped event instance


isPropagationStopped

Determine whether propagation has been stopped for the wrapped event.

public isPropagationStopped(): bool

Return Value:

whether the wrapped event stops propagation


Clone this wiki locally