Skip to content
PHP Ecosystem
Explore

ShellContext

API reference › Debug › widgets › shell › ShellContext

final readonly classyii\debug\widgets\shell\ShellContext
Sourcesrc/widgets/shell/ShellContext.php

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.

PropertyTypeDescriptionDefined by
$configUrl readonly constructorstring|nullConfiguration-chip URL on the brand bar; null when no manifest entry is available (chip renders disabled).ShellContext
$debugThemeAttributes readonly constructorarray<string, string>Document attributes applied to <html>, including the language and resolved light/dark theme.ShellContext
$mode readonly constructorstringShell mode (‘view’ / ‘index’ / ‘bare’).ShellContext
$peakMemory readonly constructorstring|nullFormatted peak memory (‘X.XX MB’); null when no captured summary is present.ShellContext
$phpVersion readonly constructorstringPHP version label shown in the brand bar.ShellContext
$resolvedTheme readonly constructorstringResolved theme (‘dark’ / ‘light’) fed to the shell header for the toggle button.ShellContext
$sidebar readonly constructorPHPForge\Debug\View\Sidebar\SidebarView|nullSidebar view-model, or null for bare pages.ShellContext
$themeIconMoon readonly constructorstringPre-rendered moon glyph for the theme-toggle button.ShellContext
$themeIconSun readonly constructorstringPre-rendered sun glyph for the theme-toggle button.ShellContext
$title readonly constructorstringDocument <title> already escaped.ShellContext
$useShell readonly constructorbooltrue when the shell layout (brand bar + sidebar) should render; false for ‘bare’ which echoes raw content into <body>.ShellContext
$yiiVersion readonly constructorstringYii framework version label shown in the brand bar.ShellContext
MethodDescriptionDefined by
__construct()Collects the prepared content and presentation state for a debugger page.ShellContext
ConstantValueDescriptionDefined 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
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

ParameterTypeDescription
$modestring
$useShellbool
$titlestring
$debugThemeAttributesarray
$resolvedThemestring
$themeIconSunstring
$themeIconMoonstring
$yiiVersionstring
$phpVersionstring
$peakMemorystring|null
$configUrlstring|null
$sidebarPHPForge\Debug\View\Sidebar\SidebarView|null