Skip to content
PHP Ecosystem
Explore

ThemeResolver

API reference › Debug Core › Theme › ThemeResolver

final classPHPForge\Debug\Theme\ThemeResolver
Sourcesrc/Theme/ThemeResolver.php

Resolves the effective debugger theme from the request’s cookie and query parameters.

MethodDescriptionDefined by
resolve() staticReturns the effective theme ('light' or 'dark').ThemeResolver
ConstantValueDescriptionDefined by
COOKIE'yii-debug-toolbar-theme'Cookie written by the client-side theme toggle.ThemeResolver
QUERY_PARAM'yii_debug_theme'Query parameter carrying the link-time theme snapshot.ThemeResolver
public static function resolve(array<array-key, mixed> $cookieParams, array<array-key, mixed> $queryParams): string

Returns the effective theme ('light' or 'dark').

Parameters

ParameterTypeDescription
$cookieParamsarray<array-key, mixed>Request cookies.
$queryParamsarray<array-key, mixed>Parsed query parameters.

Returns

string