DebugSnapshot
API reference › Debug Core › Storage › DebugSnapshot
Represents the versioned envelope persisted for one captured request.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$failures readonly constructor | array<string, PanelFailure> | Panel failures indexed by panel ID. | DebugSnapshot |
$panels readonly constructor | array<string, | Serialized panel payloads indexed by panel ID. | DebugSnapshot |
$summary readonly constructor | RequestSummary | Captured request metadata. | DebugSnapshot |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a versioned envelope for a captured request. | DebugSnapshot |
fromArray() static | Hydrates a versioned request envelope from decoded JSON data. | DebugSnapshot |
jsonSerialize() | Returns the request envelope for JSON serialization. | DebugSnapshot |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
VERSION | 4 | DebugSnapshot |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(PHPForge\Debug\Storage\RequestSummary $summary, array<string, array<string, mixed>> $panels, array<string, PHPForge\Debug\Storage\PanelFailure> $failures)Creates a versioned envelope for a captured request.
Parameters
| Parameter | Type | Description |
|---|---|---|
$summary | RequestSummary | Captured request metadata. |
$panels | array<string, | Serialized panel payloads indexed by panel ID. |
$failures | array<string, PanelFailure> | Panel failures indexed by panel ID. |
fromArray()
Section titled “fromArray() ”public static function fromArray(mixed $data): selfHydrates a versioned request envelope from decoded JSON data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | mixed | Decoded snapshot envelope. |
Returns
self: Hydrated request snapshot.
jsonSerialize()
Section titled “jsonSerialize() ”public function jsonSerialize(): array<string, mixed>Returns the request envelope for JSON serialization.
Returns
array<string, mixed>: Versioned request envelope.