PanelRenderContext
API reference › Debug Core › Panel › PanelRenderContext
Supplies request, theme, and adapter-owned URL state to a framework-neutral panel renderer.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$panel readonly constructor | string | Stable identifier of the panel being rendered. | PanelRenderContext |
$queryParams readonly constructor | array<array-key, | Parsed query parameters of the current debugger request. | PanelRenderContext |
$tag readonly constructor | string | Captured request tag. | PanelRenderContext |
$theme readonly constructor | string | Resolved debugger theme. | PanelRenderContext |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates the request, theme, and URL context for a panel renderer. | PanelRenderContext |
panelPayload() | Returns another panel payload from the current snapshot when cross-panel composition is required. | PanelRenderContext |
panelUrl() | Builds a panel URL for this captured request. | PanelRenderContext |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $tag, string $panel, array<array-key, mixed> $queryParams, string $theme, PHPForge\Debug\Routing\DebugUrlGeneratorInterface $urls, array<string, array<string, mixed>> $panels = [])Creates the request, theme, and URL context for a panel renderer.
Parameters
| Parameter | Type | Description |
|---|---|---|
$tag | string | Captured request tag. |
$panel | string | Stable identifier of the panel being rendered. |
$queryParams | array<array-key, | Parsed query parameters of the current debugger request. |
$theme | string | Resolved debugger theme. |
$urls | PHPForge\ | Adapter-owned URL generator. |
$panels | array<string, | Serialized panel payloads from the current snapshot. |
panelPayload()
Section titled “panelPayload() ”public function panelPayload(string $panel): array<string, mixed>|nullReturns another panel payload from the current snapshot when cross-panel composition is required.
Parameters
| Parameter | Type | Description |
|---|---|---|
$panel | string |
Returns
array<string, mixed>|null: Serialized panel payload, or null when it was not captured.
panelUrl()
Section titled “panelUrl() ”public function panelUrl(string|null $panel = null, array<array-key, mixed>|null $queryParams = null): stringBuilds a panel URL for this captured request.
Parameters
| Parameter | Type | Description |
|---|---|---|
$panel | string| | Target panel, or null to keep the current panel. |
$queryParams | array<array-key, | Panel parameters, or null to reuse the current query. |
Returns
string