EventDeclaration
What an emitter says about one event it dispatches — so the house can answer «what events exist?» from the emitters themselves, never from a scan of source (greenhouse decisions/0228). The name is the string handed to `dispatch()`; `dispatchedBy` the class that dispatches it; `when` one sentence on the moment it fires; `subjectKey`/`subjectType` what the payload carries and under which key; `mutable` whether a subscriber may change the subject in place; `interceptable` whether the payload carries an `InterceptionSlot` a subscriber may stop or short-circuit. A declaration describes; it never dispatches.
EventDeclaration::__construct()
public function __construct(string $name, string $dispatchedBy, string $when, string $subjectKey = 'event', ?string $subjectType = null, bool $mutable = false, bool $interceptable = false):Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $dispatchedBy | class-string | |
| $when | string | |
| $subjectKey | string | |
| $subjectType | ?string | |
| $mutable | bool | |
| $interceptable | bool |
EventDeclaration::toArray()
public function toArray(): arrayThe declaration as data, the shape a catalogue prints.