RequestPanel
API reference › Yii3 Debug › Panel › RequestPanel
Presents the captured PSR-7 request and response with the shared Yii Request panel UI.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(Yiisoft\Router\RouteCollectionInterface|null $routes = null)Creates the Request panel with the optional live route collection.
Parameters
| Parameter | Type | Description |
|---|---|---|
$routes | Yiisoft\ | Live route collection the overview reads its matched definition and configuration badges from, or null when the application registers no router. |
hasContent()
Section titled “hasContent() ”public function hasContent(array<string, mixed> $payload): boolReports whether the capture recorded request data worth opening the panel for.
Parameters
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, | Serialized Request panel payload. |
Returns
bool: true when the capture carried request data; false otherwise.
icon()
Section titled “icon() ”public function icon(): stringReturns the icon key shared with the built-in Request navigation entry.
Returns
string: Shared Debug Core icon key.
public function id(): stringReturns the identifier associating the panel with its slice of the captured payload.
Returns
string: Stable panel identifier.
name()
Section titled “name() ”public function name(): stringReturns the panel title shown in the debugger navigation.
Returns
string: Human-readable panel name.
render()
Section titled “render() ”public function render(Yii3\Debug\Panel\PanelRenderInput $input): stringRenders the detail view, letting the manifest entry fill the identity the capture omitted.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | PanelRenderInput | Payload, request context, and request summary of the page being rendered. |
Returns
string: Rendered panel markup.
toolbarItems()
Section titled “toolbarItems() ”public function toolbarItems(array<string, mixed> $payload): list<PHPForge\Debug\Toolbar\ToolbarItem>Builds the toolbar metrics: the resolved route and the response status.
Parameters
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, | Serialized Request panel payload. |
Returns
list<PHPForge\Debug\Toolbar\ToolbarItem>: Toolbar metrics in display order.