ShellContext
API reference › Debug › widgets › shell › ShellContext
Typed view-model for the debugger shell (brand bar + sidebar + main wrapper).
The $mode discriminator picks the panel, history, or bare layout. The controller supplies fully normalized header
and sidebar data so the layout only renders this object.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$configUrl readonly constructor | string| | Configuration-chip URL on the brand bar; null when no manifest entry is available (chip renders disabled). | ShellContext |
$debugThemeAttributes readonly constructor | array<string, | Document attributes applied to <html>, including the language and resolved light/dark theme. | ShellContext |
$mode readonly constructor | string | Shell mode (‘view’ / ‘index’ / ‘bare’). | ShellContext |
$peakMemory readonly constructor | string| | Formatted peak memory (‘X.XX MB’); null when no captured summary is present. | ShellContext |
$phpVersion readonly constructor | string | PHP version label shown in the brand bar. | ShellContext |
$resolvedTheme readonly constructor | string | Resolved theme (‘dark’ / ‘light’) fed to the shell header for the toggle button. | ShellContext |
$sidebar readonly constructor | PHPForge\ | Sidebar view-model, or null for bare pages. | ShellContext |
$themeIconMoon readonly constructor | string | Pre-rendered moon glyph for the theme-toggle button. | ShellContext |
$themeIconSun readonly constructor | string | Pre-rendered sun glyph for the theme-toggle button. | ShellContext |
$title readonly constructor | string | Document <title> already escaped. | ShellContext |
$useShell readonly constructor | bool | true when the shell layout (brand bar + sidebar) should render; false for ‘bare’ which echoes raw content into <body>. | ShellContext |
$yiiVersion readonly constructor | string | Yii framework version label shown in the brand bar. | ShellContext |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Collects the prepared content and presentation state for a debugger page. | ShellContext |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
MODE_BARE | 'bare' | Mode that echoes raw content into <body> without the brand bar or sidebar. | ShellContext |
MODE_INDEX | 'index' | Mode of the history grid, where the sidebar navigator acts as a cursor over the captured requests. | ShellContext |
MODE_VIEW | 'view' | Mode of a panel view, where the sidebar highlights the active panel of the inspected request. | ShellContext |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $mode, bool $useShell, string $title, array $debugThemeAttributes, string $resolvedTheme, string $themeIconSun, string $themeIconMoon, string $yiiVersion, string $phpVersion, string|null $peakMemory, string|null $configUrl, PHPForge\Debug\View\Sidebar\SidebarView|null $sidebar)Collects the prepared content and presentation state for a debugger page.
Parameters
| Parameter | Type | Description |
|---|---|---|
$mode | string | |
$useShell | bool | |
$title | string | |
$debugThemeAttributes | array | |
$resolvedTheme | string | |
$themeIconSun | string | |
$themeIconMoon | string | |
$yiiVersion | string | |
$phpVersion | string | |
$peakMemory | string| | |
$configUrl | string| | |
$sidebar | PHPForge\ |