Skip to content
docsv0.1.0

ComponentHandledEvent

POST event: an action finished being applied, whether the component's own `handle()` ran or a `component.handling` listener intercepted it. Dispatched as `component.handled` — pure notification, readonly, no slot. **Short-circuit visibility invariant.** When a `component.handling` listener short-circuits via `InterceptionSlot::shortCircuit()` (or vetoes via `stop()`), the component's own `handle()` never runs — but this event MUST still fire, with {@see $intercepted} `true`, so audit/metrics listeners are never blind to an intercepted interaction.

ComponentHandledEvent::__construct()

public function __construct(Milpa\Live\ValueObjects\InteractionRequest $request, Milpa\Live\ValueObjects\InteractionResult $result, bool $intercepted = false):

Parameters

Parameters of __construct()
NameTypeDescription
$requestInteractionRequestThe request that was handled.
$resultInteractionResultThe outcome — from the component's own `handle()`, or from a `component.handling` short-circuit/veto.
$interceptedboolTrue if a `component.handling` listener supplied or vetoed {@see $result} (the component's own `handle()` never ran).