RouterPanel
API reference › Debug Core › Panel › Router › RouterPanel
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.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
ICON | \ | RouterPanel | |
ID | \ | RouterPanel | |
TITLE | \ | RouterPanel |
Method details
Section titled “Method details”actionRoutes()
Section titled “actionRoutes() ”public function actionRoutes(list<PHPForge\Debug\Panel\Router\ActionRouteRow> $rows): selfReturns a new instance with the discovered action routes.
Parameters
| Parameter | Type | Description |
|---|---|---|
$rows | list<ActionRouteRow> | Action routes in display order. |
Returns
self: New instance carrying the requested action routes.
present()
Section titled “present() ”public function present(array<string, mixed> $data): PHPForge\Debug\PanelViewBuilds the panel view from the decoded routing capture.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | array<string, | Decoded panel payload with action, route, message, and entries keys. |
Returns
PanelView: Route overview, rules-tested trace, URL rules, and action routes.
rules()
Section titled “rules() ”public function rules(list<PHPForge\Debug\Panel\Router\RouterRuleRow> $rows): selfReturns a new instance with the configured URL rules.
Parameters
| Parameter | Type | Description |
|---|---|---|
$rows | list<RouterRuleRow> | URL rules in display order. |
Returns
self: New instance carrying the requested URL rules.
urlManager()
Section titled “urlManager() ”public function urlManager(bool $prettyUrl, bool $strictParsing, string $suffix): selfReturns a new instance with the URL manager configuration.
Parameters
| Parameter | Type | Description |
|---|---|---|
$prettyUrl | bool | Whether the URL manager generates and parses pretty URLs. |
$strictParsing | bool | Whether the URL manager only accepts requests matching a configured rule. |
$suffix | string | Global URL suffix, or '' when the URL manager declares none. |
Returns
self: New instance carrying the requested configuration.