Skip to content
PHP Ecosystem
Explore

ConfigCollector

API reference › Debug › collectors › ConfigCollector

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

Captures the application configuration and runtime environment for the Configuration panel.

PropertyTypeDescriptionDefined by
$moduleyii\debug\Module|nullDebug module supplying the log target and sibling collectors, assigned by the module on registration. Default: null.Collector
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 Configuration panel.ConfigCollector
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
getApplication() protectedReturns the active application instance, or null when the framework slot does not contain an object.ConfigCollector
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 framework/PHP/application identity and the installed-extensions roster.ConfigCollector
start() protectedHook invoked once when the collector activates; subclasses subscribe to framework events here.Collector
stop() protectedHook invoked once when the collector deactivates; subclasses detach subscriptions and clear state here.Collector
public function id(): string

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

Returns

string: Stable collector ID.

protected function getApplication(): object|null

Returns the active application instance, or null when the framework slot does not contain an object.

Returns

object|null: Active application, or null when the framework slot holds no object.

protected function snapshot(): PHPForge\Debug\Panel\Config\ConfigSnapshot|null

Snapshots the framework/PHP/application identity and the installed-extensions roster.

Returns

PHPForge\Debug\Panel\Config\ConfigSnapshot|null: Captured configuration payload; null when the collector never started.