blob: 9fc5286c693d189d38a47970c054257accedd5ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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();
$this->debugbar->getJavascriptRenderer()->dumpCssAssets();
}
public function js_action(): void
{
$this->set_content_type('text/javascript;charset=utf-8');
$this->render_nothing();
$this->debugbar->getJavascriptRenderer()->setIncludeVendors(false)->dumpJsAssets();
}
}
|