-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNowoConsoleDebugBundle.php
More file actions
36 lines (29 loc) · 1 KB
/
Copy pathNowoConsoleDebugBundle.php
File metadata and controls
36 lines (29 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
declare(strict_types=1);
namespace Nowo\ConsoleDebugBundle;
use Nowo\ConsoleDebugBundle\DependencyInjection\ConsoleDebugExtension;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Symfony bundle that outputs cdbg() calls to the browser console for authorized users.
*
* @author Héctor Franco Aceituno <hectorfranco@nowo.tech>
* @copyright 2026 Nowo.tech
*/
class NowoConsoleDebugBundle extends Bundle
{
public function getContainerExtension(): ?ExtensionInterface
{
if ($this->extension === null) {
$this->extension = new ConsoleDebugExtension();
}
return $this->extension instanceof ExtensionInterface ? $this->extension : null;
}
public function boot(): void
{
parent::boot();
if ($this->container !== null && $this->container->has('nowo.console_debug')) {
ConsoleDebugHolder::set($this->container->get('nowo.console_debug'));
}
}
}