Event Collector
Captures PSR-14 dispatched events with timing, listener metadata, and source location.

What It Captures
| Field | Description |
|---|---|
name | Event class name |
event | Serialized event object |
file | Source file of the dispatch call |
line | Source line of the dispatch call |
time | Timestamp when the event was dispatched |
Data Schema
[
{
"name": "App\\Event\\UserRegistered",
"event": "object@App\\Event\\UserRegistered#12",
"file": "/app/src/UserService.php",
"line": "42",
"time": 1711878000.456
}
]Summary (shown in debug entry list):
{
"event": {
"total": 8
}
}Contract
use AppDevPanel\Kernel\Collector\EventCollector;
$collector->collect(
event: $event, // The dispatched event object
line: '/app/src/UserService.php:42',
);INFO
EventCollectorAppDevPanel\Kernel\Collector\EventCollectorCollects Event data during application lifecycle. implements SummaryCollectorInterfaceAppDevPanel\Kernel\Collector\SummaryCollectorInterfaceSummary data collector responsibility is to collect summary data for a collector. Summary is used to display a list of previous requests and select one to display full info. Its data set is specific to the list and is reduced compared to full data collected in {@see CollectorInterface}. and depends on TimelineCollectorAppDevPanel\Kernel\Collector\TimelineCollectorCollects Timeline data during application lifecycle. for cross-collector timeline integration.
How It Works
The collector is fed by EventDispatcherInterfaceProxyAppDevPanel\Kernel\Collector\EventDispatcherInterfaceProxyDecorator proxy for Event Dispatcher Interface. Intercepts calls and forwards data to collectors. — a PSR-14 EventDispatcherInterfacePsr\EventDispatcher\EventDispatcherInterfacePSR-14 Event Dispatcher Interface. Defines a dispatcher for events. decorator. Every $dispatcher->dispatch($event) call is intercepted, timed, and forwarded to the collector.
Framework adapters register the proxy automatically.
Debug Panel
- Event type badges — color-coded by event category (request, response, controller, etc.)
- Chronological list — events shown in dispatch order with timestamps
- Expandable details — click to view the full event object and listener chain
- Event count — total events shown in sidebar badge