DebugUrlGenerator
API reference › Yii3 Debug › Web › DebugUrlGenerator
Builds Yii3 debugger URLs for context-aware panel renderers.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $routePrefix = '/debug')Creates a URL generator for the normalized debugger route prefix.
Parameters
| Parameter | Type | Description |
|---|---|---|
$routePrefix | string | Base path every debugger URL is built on; a trailing slash is trimmed. |
dbExplain()
Section titled “dbExplain() ”public function dbExplain(string $tag, int $sequence): stringBuilds the URL of the query plan for one stored statement.
Parameters
| Parameter | Type | Description |
|---|---|---|
$tag | string | Capture holding the statement. |
$sequence | int | Position of the statement within that capture. |
Returns
string: URL of the plan page.
panel()
Section titled “panel() ”public function panel(string $tag, string $panel, array<array-key, mixed> $queryParams = []): stringBuilds a panel URL while keeping the captured tag and target panel authoritative.
Parameters
| Parameter | Type | Description |
|---|---|---|
$tag | string | Capture to open. |
$panel | string | Panel to open within that capture. |
$queryParams | array<array-key, | Extra query parameters; route-owned keys are ignored. |
Returns
string: URL of the panel view.
routePrefix()
Section titled “routePrefix() ”public function routePrefix(): stringReturns the normalized debugger route prefix.
Returns
string: Base path without a trailing slash.