Skip to content
PHP Ecosystem
Explore

SidebarSnapshot

API reference › Debug Core › View › Sidebar › SidebarSnapshot

final readonly classPHPForge\Debug\View\Sidebar\SidebarSnapshot
Sourcesrc/View/Sidebar/SidebarSnapshot.php

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.

PropertyTypeDescriptionDefined by
$ariaLabel readonly constructorstringAccessible name for the surrounding <section> element.SidebarSnapshot
$fullUrl readonly constructorstringFull URL captured in the request summary; used as the title hover on the URL chip.SidebarSnapshot
$isAjax readonly constructorboolWhether the captured request was an AJAX request; surfaces the ‘AJAX’ tag in the card meta strip.SidebarSnapshot
$method readonly constructorstringHTTP method (‘GET’, ‘POST’, …). Empty when not captured.SidebarSnapshot
$navigation readonly constructorSidebarNavigationNavigator row moving away from this capture.SidebarSnapshot
$path readonly constructorstringPath-only URL display (scheme/host stripped). Empty when not captured.SidebarSnapshot
$statusCode readonly constructorintResponse status code; ‘0’ when not captured.SidebarSnapshot
$statusVariant readonly constructorstringStatus-pill CSS modifier (‘2xx’ / ‘3xx’ / ‘4xx’ / ‘5xx’ / ‘none’) derived from $statusCode.SidebarSnapshot
$time readonly constructorstringFormatted request time (‘HH:MM:SS’); empty when not captured.SidebarSnapshot
$title readonly constructorstringSection heading shown above the snapshot card (‘Current request’ / ‘Newest request’).SidebarSnapshot
MethodDescriptionDefined by
fromSummary() staticCreates the snapshot card of one capture.SidebarSnapshot
public static function fromSummary(PHPForge\Debug\Storage\RequestSummary $summary, PHPForge\Debug\View\Sidebar\SidebarNavigation $navigation, string $title, string|null $ariaLabel = null): self

Creates the snapshot card of one capture.

Parameters

ParameterTypeDescription
$summaryPHPForge\Debug\Storage\RequestSummarySummary of the capture the card describes.
$navigationSidebarNavigationNavigator row the host computed for that capture.
$titlestringSection heading shown above the card.
$ariaLabelstring|nullAccessible name of the section, or null to reuse the heading.

Returns

self: Snapshot card view-model.