Skip to content
PHP Ecosystem
Explore

RequestPanel

API reference › Yii3 Debug › Panel › RequestPanel

final readonly classYii3\Debug\Panel\RequestPanel
ImplementsToolbarPanelProviderInterface
Sourcesrc/Panel/RequestPanel.php

Presents the captured PSR-7 request and response with the shared Yii Request panel UI.

MethodDescriptionDefined by
__construct()Creates the Request panel with the optional live route collection.RequestPanel
hasContent()Reports whether the capture recorded request data worth opening the panel for.RequestPanel
icon()Returns the icon key shared with the built-in Request navigation entry.RequestPanel
id()Returns the identifier associating the panel with its slice of the captured payload.RequestPanel
name()Returns the panel title shown in the debugger navigation.RequestPanel
render()Renders the detail view, letting the manifest entry fill the identity the capture omitted.RequestPanel
toolbarItems()Builds the toolbar metrics: the resolved route and the response status.RequestPanel
public function __construct(Yiisoft\Router\RouteCollectionInterface|null $routes = null)

Creates the Request panel with the optional live route collection.

Parameters

ParameterTypeDescription
$routesYiisoft\Router\RouteCollectionInterface|nullLive route collection the overview reads its matched definition and configuration badges from, or null when the application registers no router.
public function hasContent(array<string, mixed> $payload): bool

Reports whether the capture recorded request data worth opening the panel for.

Parameters

ParameterTypeDescription
$payloadarray<string, mixed>Serialized Request panel payload.

Returns

bool: true when the capture carried request data; false otherwise.

public function icon(): string

Returns the icon key shared with the built-in Request navigation entry.

Returns

string: Shared Debug Core icon key.

public function id(): string

Returns the identifier associating the panel with its slice of the captured payload.

Returns

string: Stable panel identifier.

public function name(): string

Returns the panel title shown in the debugger navigation.

Returns

string: Human-readable panel name.

public function render(Yii3\Debug\Panel\PanelRenderInput $input): string

Renders the detail view, letting the manifest entry fill the identity the capture omitted.

Parameters

ParameterTypeDescription
$inputPanelRenderInputPayload, request context, and request summary of the page being rendered.

Returns

string: Rendered panel markup.

public function toolbarItems(array<string, mixed> $payload): list<PHPForge\Debug\Toolbar\ToolbarItem>

Builds the toolbar metrics: the resolved route and the response status.

Parameters

ParameterTypeDescription
$payloadarray<string, mixed>Serialized Request panel payload.

Returns

list<PHPForge\Debug\Toolbar\ToolbarItem>: Toolbar metrics in display order.