DumpSnapshot
API reference › Debug Core › Panel › Dump › DumpSnapshot
Canonical Dump panel snapshot holding the captured rows in their typed form.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a dump snapshot from captured rows. | DumpSnapshot |
capture() static | Converts canonical logger tuples into typed rows. | DumpSnapshot |
entries() | Returns the captured dump rows. | DumpSnapshot |
fromArray() static | Narrows the persisted dump payload into a typed snapshot. | DumpSnapshot |
jsonSerialize() | Returns the panel snapshot for JSON serialization. | DumpSnapshot |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(list<PHPForge\Debug\Panel\Dump\DumpRow> $entries)Creates a dump snapshot from captured rows.
Parameters
| Parameter | Type | Description |
|---|---|---|
$entries | list<DumpRow> |
capture()
Section titled “capture() ”public static function capture(list<PHPForge\Debug\Panel\Dump\LogTuple> $messages): selfConverts canonical logger tuples into typed rows.
Parameters
| Parameter | Type | Description |
|---|---|---|
$messages | list<PHPForge\ | Logger tuples in capture order. |
Returns
self
entries()
Section titled “entries() ”public function entries(): list<PHPForge\Debug\Panel\Dump\DumpRow>Returns the captured dump rows.
Returns
list<DumpRow>: Captured rows in capture order.
fromArray()
Section titled “fromArray() ”public static function fromArray(mixed $data, string $path): selfNarrows the persisted dump payload into a typed snapshot.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | mixed | Persisted payload, expected to be an object carrying an entries list. |
$path | string | JSON path of the payload, used to report a malformed capture. |
Returns
self: Snapshot carrying the persisted dump rows.
jsonSerialize()
Section titled “jsonSerialize() ”public function jsonSerialize(): array<string, mixed>Returns the panel snapshot for JSON serialization.
Returns
array<string, mixed>