DebugPageRenderer
API reference › Yii3 Debug › Web › DebugPageRenderer
Renders debugger pages and optional extension panels with the shared Debug Core shell.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates the page renderer with its view, assets, configuration, templates, and debugger routes. | DebugPageRenderer |
compare() | Renders the comparison page for two captures. | DebugPageRenderer |
config() | Renders the live configuration page. | DebugPageRenderer |
extension() | Renders one captured extension panel. | DebugPageRenderer |
hasExtensionPanel() | Returns whether a panel is registered under the given ID. | DebugPageRenderer |
history() | Renders the captured request history. | DebugPageRenderer |
phpInfo() | Renders the phpinfo() page inside the debugger shell. | DebugPageRenderer |
withExtensionPanels() | Returns a copy carrying the extension panels shown in the sidebar. | DebugPageRenderer |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(Yiisoft\View\WebView $view, Yiisoft\Assets\AssetManager $assetManager, Yii3\Debug\ConfigDataFactory $configDataFactory, string $viewPath, Yii3\Debug\Middleware\ToolbarOptions $options = new \Yii3\Debug\Middleware\ToolbarOptions())Creates the page renderer with its view, assets, configuration, templates, and debugger routes.
Parameters
| Parameter | Type | Description |
|---|---|---|
$view | Yiisoft\ | View rendering the debugger templates. |
$assetManager | Yiisoft\ | Manager resolving the published URLs of the debugger assets. |
$configDataFactory | Yii3\ | Factory building the live configuration payload. |
$viewPath | string | Directory the debugger templates are read from. |
$options | Yii3\ | Settings carrying the route prefix every debugger URL is built on. |
compare()
Section titled “compare() ”public function compare(Yii3\Debug\Comparison\HistoryComparison $comparison, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest, string $theme): stringRenders the comparison page for two captures.
Parameters
| Parameter | Type | Description |
|---|---|---|
$comparison | Yii3\ | Differences between the two captures. |
$manifest | array<string, | Captured request summaries keyed by tag. |
$theme | string | Resolved theme: 'light' or 'dark'. |
Returns
string: Rendered debugger page.
config()
Section titled “config() ”public function config(string $tag, string $theme, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest = [], PHPForge\Debug\Storage\DebugSnapshot|null $snapshot = null): stringRenders the live configuration page.
Parameters
| Parameter | Type | Description |
|---|---|---|
$tag | string | Capture in context, used by the sidebar links. |
$theme | string | Resolved theme: 'light' or 'dark'. |
$manifest | array<string, | Captured request summaries keyed by tag. |
$snapshot | PHPForge\ | Capture backing the sidebar, or null when none is selected. |
Returns
string: Rendered debugger page.
extension()
Section titled “extension() ”public function extension(PHPForge\Debug\Storage\DebugSnapshot $snapshot, string $panelId, string $theme, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest = [], array<array-key, mixed> $queryParams = []): stringRenders one captured extension panel.
Parameters
| Parameter | Type | Description |
|---|---|---|
$snapshot | PHPForge\ | Capture the panel renders. |
$panelId | string | Panel to render. |
$theme | string | Resolved theme: 'light' or 'dark'. |
$manifest | array<string, | Captured request summaries keyed by tag. |
$queryParams | array<array-key, | Raw query parameters of the debugger request. |
Returns
string: Rendered debugger page.
hasExtensionPanel()
Section titled “hasExtensionPanel() ”public function hasExtensionPanel(string $panelId): boolReturns whether a panel is registered under the given ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
$panelId | string | Panel to look up. |
Returns
bool: true when the panel is registered; false otherwise.
history()
Section titled “history() ”public function history(array<string, PHPForge\Debug\Storage\RequestSummary> $manifest, array<array-key, mixed> $queryParams, string $theme, PHPForge\Debug\Storage\DebugSnapshot|null $snapshot = null): stringRenders the captured request history.
Parameters
| Parameter | Type | Description |
|---|---|---|
$manifest | array<string, | Captured request summaries keyed by tag. |
$queryParams | array<array-key, | Raw query parameters of the debugger request. |
$theme | string | Resolved theme: 'light' or 'dark'. |
$snapshot | PHPForge\ | Capture backing the sidebar, or null when none is selected. |
Returns
string: Rendered debugger page.
phpInfo()
Section titled “phpInfo() ”public function phpInfo(string $theme, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest = [], PHPForge\Debug\Storage\DebugSnapshot|null $snapshot = null): stringRenders the phpinfo() page inside the debugger shell.
Parameters
| Parameter | Type | Description |
|---|---|---|
$theme | string | Resolved theme: 'light' or 'dark'. |
$manifest | array<string, | Captured request summaries keyed by tag. |
$snapshot | PHPForge\ | Capture backing the sidebar, or null when none is selected. |
Returns
string: Rendered debugger page.
withExtensionPanels()
Section titled “withExtensionPanels() ”public function withExtensionPanels(iterable<Yii3\Debug\Panel\ExtensionPanelInterface> $extensionPanels): selfReturns a copy carrying the extension panels shown in the sidebar.
Parameters
| Parameter | Type | Description |
|---|---|---|
$extensionPanels | iterable<Yii3\> | Optional panel presenters in sidebar order. |
Returns
self: Renderer with the panels applied.