Skip to content
PHP Ecosystem
Explore

QueueCollector

API reference › Debug › collectors › QueueCollector

classyii\debug\collectors\QueueCollector
ExtendsCollector
ImplementsCollectorInterface
Sourcesrc/collectors/QueueCollector.php

Captures every queue lifecycle event (afterPush, afterExec, afterError) emitted by any class extending yii\queue\Queue from yiisoft/yii2-queue.

PropertyTypeDescriptionDefined by
$moduleyii\debug\Module|nullDebug module supplying the log target and sibling collectors, assigned by the module on registration. Default: null.Collector
$redactedPropertieslist<string>Public job-property names whose values are replaced before snapshot persistence. Default: ['accessToken', 'apiKey', 'authorization', 'password', 'refreshToken', 'secret', 'token'].QueueCollector
MethodDescriptionDefined by
capture() finalEncodes the typed snapshot built by the subclass into the payload persisted for the panel.Collector
id()Returns the stable ID pairing this collector with the Queue panel.QueueCollector
instrument()Installs low-level instrumentation as soon as the module registers the collector, before the panels are built.Collector
shutdown() finalDeactivates the collector once, releasing any subscription created by start().Collector
startup() finalActivates the collector once at the start of the request lifecycle.Collector
getLogMessages() protectedReturns the accumulated log messages, optionally filtered by level, category, and exclusion lists.Collector
getLogTarget() protectedReturns the initialized log target of the owning debug module.Collector
isStarted() protectedReturns whether the collector is active for the current request.Collector
snapshot() protectedSnapshots the captured queue records.QueueCollector
start() protectedSubscribes to the four queue lifecycle events (afterPush, beforeExec, afterExec, afterError).QueueCollector
stop() protectedDetaches the queue listeners and clears the accumulated state, so a reused worker process starts clean.QueueCollector
public function id(): string

Returns the stable ID pairing this collector with the Queue panel.

Returns

string: Stable collector ID.

protected function snapshot(): PHPForge\Debug\Panel\Queue\QueueSnapshot|null

Snapshots the captured queue records.

Returns

PHPForge\Debug\Panel\Queue\QueueSnapshot|null: Captured queue payload; null when the collector never started.

protected function start(): void

Subscribes to the four queue lifecycle events (afterPush, beforeExec, afterExec, afterError).

protected function stop(): void

Detaches the queue listeners and clears the accumulated state, so a reused worker process starts clean.