InMemoryTuiEventBus
Synchronous in-process event bus for the TUI: listeners run in registration order, inline, on the same tick the event is published.
InMemoryTuiEventBus::subscribe()
public function subscribe(string $eventType, callable $listener): voidRegisters a listener for one event type; listeners run in registration order.
Parameters
| Name | Type | Description |
|---|---|---|
| $eventType | string | |
| $listener | callable |
InMemoryTuiEventBus::publish()
public function publish(Milpa\Live\ValueObjects\Tui\TuiEvent $event): voidRuns every listener for this event's type, inline and synchronously.
Parameters
| Name | Type | Description |
|---|---|---|
| $event | Milpa\Live\ValueObjects\Tui\TuiEvent |
InMemoryTuiEventBus::history()
public function history(): array