DebugServiceProvider
API reference › Yii3 Debug › DebugServiceProvider
Attaches the debugger to the application PSR-14 dispatcher and asset loader without redefining either service.
Every decoration is idempotent, so an application registering the provider in more than one configuration group still ends up with each service decorated exactly once.
The Logs panel is fed by the debug target the package merges into the yiisoft/log parameters, so the application
logger is built by the application itself and is never decorated here.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
getDefinitions() | Returns the services the provider owns. | DebugServiceProvider |
getExtensions() | Returns the decorations applied to the application PSR-14 dispatcher and asset loader. | DebugServiceProvider |
Method details
Section titled “Method details”getDefinitions()
Section titled “getDefinitions() ”public function getDefinitions(): array<string, mixed>Returns the services the provider owns.
Returns
array<string, mixed>: Empty set; the debugger only extends services the application already declares.
getExtensions()
Section titled “getExtensions() ”public function getExtensions(): array<class-string, Closure(Psr\Container\ContainerInterface, object): object>Returns the decorations applied to the application PSR-14 dispatcher and asset loader.
Each service keeps its application definition; a decoration runs once, when the container first resolves it.
Returns
array<class-string, Closure(Psr\Container\ContainerInterface, object): object>: Decorations keyed by extended service.