aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/debugbar.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/debugbar.php')
-rw-r--r--app/controllers/debugbar.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/controllers/debugbar.php b/app/controllers/debugbar.php
index a80000d..59627f2 100644
--- a/app/controllers/debugbar.php
+++ b/app/controllers/debugbar.php
@@ -1,17 +1,24 @@
<?php
final class DebugbarController extends Trails_Controller
{
+ public function __construct(
+ Trails\Dispatcher $dispatcher,
+ private readonly DebugBar\DebugBar $debugbar
+ ) {
+ parent::__construct($dispatcher);
+ }
+
public function css_action(): void
{
$this->set_content_type('text/css;charset=utf-8');
$this->render_nothing();
- app()->get(DebugBar\DebugBar::class)->getJavascriptRenderer()->dumpCssAssets();
+ $this->debugbar->getJavascriptRenderer()->dumpCssAssets();
}
public function js_action(): void
{
$this->set_content_type('text/javascript;charset=utf-8');
$this->render_nothing();
- app()->get(DebugBar\DebugBar::class)->getJavascriptRenderer()->setIncludeVendors(false)->dumpJsAssets();
+ $this->debugbar->getJavascriptRenderer()->setIncludeVendors(false)->dumpJsAssets();
}
}