Skip to content
PHP Ecosystem
Explore

ShellContextFactory

API reference › Debug › service › ShellContextFactory

classyii\debug\service\ShellContextFactory
Sourcesrc/service/ShellContextFactory.php

Builds the page shell of the debugger actions: the bare shell installed before an action runs, and the full shell with brand bar and sidebar of the history, panel, and standalone pages.

PropertyTypeDescriptionDefined by
$module protected readonly constructoryii\debug\ModuleDebug module read for the page title and the Configuration panel at call time.ShellContextFactory
MethodDescriptionDefined by
__construct()Binds debugger page-shell creation to the debug module.ShellContextFactory
bare()Returns the shell that echoes raw content without the brand bar or sidebar.ShellContextFactory
forSnapshot()Returns the shell of an index, view, or standalone page.ShellContextFactory
public function __construct(yii\debug\Module $module)

Binds debugger page-shell creation to the debug module.

Parameters

ParameterTypeDescription
$moduleyii\debug\ModuleDebug module read for the page title and the Configuration panel at call time.
public function bare(string $theme): yii\debug\widgets\shell\ShellContext

Returns the shell that echoes raw content without the brand bar or sidebar.

Parameters

ParameterTypeDescription
$themestringResolved light/dark theme.

Returns

yii\debug\widgets\shell\ShellContext: Bare shell.

public function forSnapshot(string $mode, string $theme, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest, string|null $activeTag, PHPForge\Debug\Storage\RequestSummary|null $summary, PHPForge\Debug\View\Sidebar\SidebarView $sidebar): yii\debug\widgets\shell\ShellContext

Returns the shell of an index, view, or standalone page.

The brand bar reads the Yii and PHP versions the Configuration panel captured, falling back to the running ones, and links the Configuration chip to the focused capture, or to the newest one when no capture is focused.

Parameters

ParameterTypeDescription
$modestringOne of the ShellContext mode constants.
$themestringResolved light/dark theme.
$manifestarray<string, PHPForge\Debug\Storage\RequestSummary>Manifest entries indexed by tag, newest first.
$activeTagstring|nullTag focused by the page, or null on the index.
$summaryPHPForge\Debug\Storage\RequestSummary|nullSummary of the focused entry, or null on the index.
$sidebarPHPForge\Debug\View\Sidebar\SidebarViewPrepared sidebar payload.

Returns

yii\debug\widgets\shell\ShellContext: Shell for the requested page.