Skip to content
PHP Ecosystem
Explore

DebugUrlGenerator

API reference › Yii3 Debug › Web › DebugUrlGenerator

final readonly classYii3\Debug\Web\DebugUrlGenerator
ImplementsPHPForge\Debug\Routing\DebugUrlGeneratorInterface
Sourcesrc/Web/DebugUrlGenerator.php

Builds Yii3 debugger URLs for context-aware panel renderers.

MethodDescriptionDefined by
__construct()Creates a URL generator for the normalized debugger route prefix.DebugUrlGenerator
dbExplain()Builds the URL of the query plan for one stored statement.DebugUrlGenerator
panel()Builds a panel URL while keeping the captured tag and target panel authoritative.DebugUrlGenerator
routePrefix()Returns the normalized debugger route prefix.DebugUrlGenerator
public function __construct(string $routePrefix = '/debug')

Creates a URL generator for the normalized debugger route prefix.

Parameters

ParameterTypeDescription
$routePrefixstringBase path every debugger URL is built on; a trailing slash is trimmed.
public function dbExplain(string $tag, int $sequence): string

Builds the URL of the query plan for one stored statement.

Parameters

ParameterTypeDescription
$tagstringCapture holding the statement.
$sequenceintPosition of the statement within that capture.

Returns

string: URL of the plan page.

public function panel(string $tag, string $panel, array<array-key, mixed> $queryParams = []): string

Builds a panel URL while keeping the captured tag and target panel authoritative.

Parameters

ParameterTypeDescription
$tagstringCapture to open.
$panelstringPanel to open within that capture.
$queryParamsarray<array-key, mixed>Extra query parameters; route-owned keys are ignored.

Returns

string: URL of the panel view.

public function routePrefix(): string

Returns the normalized debugger route prefix.

Returns

string: Base path without a trailing slash.