QueueSnapshot
API reference › Debug Core › Panel › Queue › QueueSnapshot
Canonical Queue panel snapshot holding the captured job events in their typed form.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a queue snapshot from captured job events. | QueueSnapshot |
capture() static | Narrows the captured queue-event payloads into typed records. | QueueSnapshot |
entries() | Returns the captured queue lifecycle events. | QueueSnapshot |
fromArray() static | Narrows the persisted queue payload into a typed snapshot. | QueueSnapshot |
jsonSerialize() | Returns the panel snapshot for JSON serialization. | QueueSnapshot |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(list<PHPForge\Debug\Panel\Queue\JobRecord> $entries)Creates a queue snapshot from captured job events.
Parameters
| Parameter | Type | Description |
|---|---|---|
$entries | list<JobRecord> |
capture()
Section titled “capture() ”public static function capture(array<array-key, mixed> $records): selfNarrows the captured queue-event payloads into typed records.
Parameters
| Parameter | Type | Description |
|---|---|---|
$records | array<array-key, | Captured payloads in event order; non-array entries are dropped. |
Returns
self
entries()
Section titled “entries() ”public function entries(): list<PHPForge\Debug\Panel\Queue\JobRecord>Returns the captured queue lifecycle events.
Returns
list<JobRecord>: Captured job events in event order.
fromArray()
Section titled “fromArray() ”public static function fromArray(mixed $data, string $path): selfNarrows the persisted queue 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 job events.
jsonSerialize()
Section titled “jsonSerialize() ”public function jsonSerialize(): array<string, mixed>Returns the panel snapshot for JSON serialization.
Returns
array<string, mixed>