SessionPanel.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This file is part of the Nette Framework (https://nette.org) |
| 5 | * Copyright (c) 2004 David Grudl (https://davidgrudl.com) |
| 6 | */ |
| 7 | declare (strict_types=1); |
| 8 | namespace FapiMember\Library\Nette\Bridges\HttpTracy; |
| 9 | |
| 10 | use FapiMember\Library\Nette; |
| 11 | use FapiMember\Library\Tracy; |
| 12 | /** |
| 13 | * Session panel for Debugger Bar. |
| 14 | */ |
| 15 | class SessionPanel implements Tracy\IBarPanel |
| 16 | { |
| 17 | use Nette\SmartObject; |
| 18 | /** |
| 19 | * Renders tab. |
| 20 | */ |
| 21 | public function getTab(): string |
| 22 | { |
| 23 | return Nette\Utils\Helpers::capture(function () { |
| 24 | require __DIR__ . '/templates/SessionPanel.tab.phtml'; |
| 25 | }); |
| 26 | } |
| 27 | /** |
| 28 | * Renders panel. |
| 29 | */ |
| 30 | public function getPanel(): string |
| 31 | { |
| 32 | return Nette\Utils\Helpers::capture(function () { |
| 33 | require __DIR__ . '/templates/SessionPanel.panel.phtml'; |
| 34 | }); |
| 35 | } |
| 36 | } |
| 37 |