ConnectionInstrumentation
API reference › Yii3 Debug › Db › ConnectionInstrumentation
Attaches the debugger to the application database connection at bootstrap.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
apply() static | Attaches available observers to the application connection. | ConnectionInstrumentation |
Method details
Section titled “Method details”apply()
Section titled “apply() ”public static function apply(Psr\Container\ContainerInterface $container): voidAttaches available observers to the application connection.
Logger attachment applies to logger-aware connections. Profiler instrumentation applies independently to PDO-backed, profiler-aware connections. Missing services or unsupported capabilities leave that operation untouched. Attaching is idempotent, so application wiring remains valid.
Parameters
| Parameter | Type | Description |
|---|---|---|
$container | Psr\ | Container the connection and its observers are resolved from. |