Skip to content

Internals Event Interfaces IEventListener

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

event\interfaces\IEventListener

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/event/interfaces/IEventListener.php · Snapshot 8411f4287706.

The request-wide event dispatcher calls listeners synchronously in registration order and collects their arrays. Listener exceptions propagate.

IEventListener

Declaration and architectural role

interface IEventListener

Source description (behavioral corrections are recorded in Known discrepancies):

Interface IEventListener

The IEventListener interface defines the contract for event listener classes that handle specific events in the event-driven architecture. Any class implementing this interface must provide an implementation for the handle method to process incoming events.

Constants, enum cases, traits and properties

No own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.

Method index

Method Signature
handle public function handle(IEvent $event): array

handle

Source line 26

public function handle(IEvent $event): array;

Parameters

Parameter Type, modifiers and default Purpose
$event IEvent $event The event to handle.

Handles the specified event.

This method is called when an event is dispatched. It receives an instance of IEvent, allowing the listener to process the event and perform any necessary actions based on the event data.

@param IEvent $event The event to handle. @return array An array of results or responses from the event handling.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

Clone this wiki locally