SidebarSnapshot
API reference › Debug Core › View › Sidebar › SidebarSnapshot
Typed view-model for the snapshot card surfaced at the top of the debugger sidebar (‘CURRENT REQUEST’ / ‘NEWEST REQUEST’).
The request identity is derived from the capture summary, so every host renders the method, URL, status, and time
of a capture the same way; the navigator row comes from the host through SidebarNavigation.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$ariaLabel readonly constructor | string | Accessible name for the surrounding <section> element. | SidebarSnapshot |
$fullUrl readonly constructor | string | Full URL captured in the request summary; used as the title hover on the URL chip. | SidebarSnapshot |
$isAjax readonly constructor | bool | Whether the captured request was an AJAX request; surfaces the ‘AJAX’ tag in the card meta strip. | SidebarSnapshot |
$method readonly constructor | string | HTTP method (‘GET’, ‘POST’, …). Empty when not captured. | SidebarSnapshot |
$navigation readonly constructor | SidebarNavigation | Navigator row moving away from this capture. | SidebarSnapshot |
$path readonly constructor | string | Path-only URL display (scheme/host stripped). Empty when not captured. | SidebarSnapshot |
$statusCode readonly constructor | int | Response status code; ‘0’ when not captured. | SidebarSnapshot |
$statusVariant readonly constructor | string | Status-pill CSS modifier (‘2xx’ / ‘3xx’ / ‘4xx’ / ‘5xx’ / ‘none’) derived from $statusCode. | SidebarSnapshot |
$time readonly constructor | string | Formatted request time (‘HH:MM:SS’); empty when not captured. | SidebarSnapshot |
$title readonly constructor | string | Section heading shown above the snapshot card (‘Current request’ / ‘Newest request’). | SidebarSnapshot |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
fromSummary() static | Creates the snapshot card of one capture. | SidebarSnapshot |
Method details
Section titled “Method details”fromSummary()
Section titled “fromSummary() ”public static function fromSummary(PHPForge\Debug\Storage\RequestSummary $summary, PHPForge\Debug\View\Sidebar\SidebarNavigation $navigation, string $title, string|null $ariaLabel = null): selfCreates the snapshot card of one capture.
Parameters
| Parameter | Type | Description |
|---|---|---|
$summary | PHPForge\ | Summary of the capture the card describes. |
$navigation | SidebarNavigation | Navigator row the host computed for that capture. |
$title | string | Section heading shown above the card. |
$ariaLabel | string| | Accessible name of the section, or null to reuse the heading. |
Returns
self: Snapshot card view-model.