Skip to content
PHP Ecosystem
Explore

RouterPanel

API reference › Debug Core › Panel › Router › RouterPanel

final classPHPForge\Debug\Panel\Router\RouterPanel
ExtendsPHPForge\Debug\Panel
Sourcesrc/Panel/Router/RouterPanel.php

Presents the routing trace of the request, the configured URL rules, and the discovered action routes.

URL rules and action routes are read from live framework services, so the adapter supplies them with RouterPanel::rules(), RouterPanel::actionRoutes(), and RouterPanel::urlManager() before presenting.

MethodDescriptionDefined by
actionRoutes()Returns a new instance with the discovered action routes.RouterPanel
present()Builds the panel view from the decoded routing capture.RouterPanel
rules()Returns a new instance with the configured URL rules.RouterPanel
urlManager()Returns a new instance with the URL manager configuration.RouterPanel
ConstantValueDescriptionDefined by
ICON\PHPForge\Debug\Panel\Router\RouterMessage::ID->valueRouterPanel
ID\PHPForge\Debug\Panel\Router\RouterMessage::ID->valueRouterPanel
TITLE\PHPForge\Debug\Panel\Router\RouterMessage::TITLE->valueRouterPanel
public function actionRoutes(list<PHPForge\Debug\Panel\Router\ActionRouteRow> $rows): self

Returns a new instance with the discovered action routes.

Parameters

ParameterTypeDescription
$rowslist<ActionRouteRow>Action routes in display order.

Returns

self: New instance carrying the requested action routes.

public function present(array<string, mixed> $data): PHPForge\Debug\PanelView

Builds the panel view from the decoded routing capture.

Parameters

ParameterTypeDescription
$dataarray<string, mixed>Decoded panel payload with action, route, message, and entries keys.

Returns

PanelView: Route overview, rules-tested trace, URL rules, and action routes.

public function rules(list<PHPForge\Debug\Panel\Router\RouterRuleRow> $rows): self

Returns a new instance with the configured URL rules.

Parameters

ParameterTypeDescription
$rowslist<RouterRuleRow>URL rules in display order.

Returns

self: New instance carrying the requested URL rules.

public function urlManager(bool $prettyUrl, bool $strictParsing, string $suffix): self

Returns a new instance with the URL manager configuration.

Parameters

ParameterTypeDescription
$prettyUrlboolWhether the URL manager generates and parses pretty URLs.
$strictParsingboolWhether the URL manager only accepts requests matching a configured rule.
$suffixstringGlobal URL suffix, or '' when the URL manager declares none.

Returns

self: New instance carrying the requested configuration.