EventSnapshot
API reference › Debug Core › Panel › Event › EventSnapshot
Canonical Event panel snapshot holding the captured rows in their typed form.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a snapshot from the captured event rows. | EventSnapshot |
entries() | Returns the captured event rows. | EventSnapshot |
fromArray() static | Hydrates the Event panel snapshot from decoded JSON data. | EventSnapshot |
jsonSerialize() | Returns the snapshot for JSON serialization. | EventSnapshot |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(list<PHPForge\Debug\Panel\Event\EventRow> $entries)Creates a snapshot from the captured event rows.
Parameters
| Parameter | Type | Description |
|---|---|---|
$entries | list<EventRow> | Captured rows in fire order. |
entries()
Section titled “entries() ”public function entries(): list<PHPForge\Debug\Panel\Event\EventRow>Returns the captured event rows.
Returns
list<EventRow>: Captured rows in fire order.
fromArray()
Section titled “fromArray() ”public static function fromArray(mixed $data, string $path): selfHydrates the Event panel snapshot from decoded JSON data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | mixed | Decoded Event panel payload. |
$path | string | Payload path used in hydration errors. |
Returns
self: Hydrated snapshot carrying the typed rows.
jsonSerialize()
Section titled “jsonSerialize() ”public function jsonSerialize(): array<string, mixed>Returns the snapshot for JSON serialization.
Returns
array<string, mixed>: Serialized event rows in fire order.