Skip to content
PHP Ecosystem
Explore

DebugServiceProvider

API reference › Yii3 Debug › DebugServiceProvider

final classYii3\Debug\DebugServiceProvider
ImplementsYiisoft\Di\ServiceProviderInterface
Sourcesrc/DebugServiceProvider.php

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.

MethodDescriptionDefined by
getDefinitions()Returns the services the provider owns.DebugServiceProvider
getExtensions()Returns the decorations applied to the application PSR-14 dispatcher and asset loader.DebugServiceProvider
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.

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.