RouterRuleRow
API reference › Debug Core › Panel › Router › RouterRuleRow
Typed view-model for one row in the Router Rules table.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$mode readonly constructor | string | Routing mode (PARSING ONLY / CREATION ONLY / BOTH), or '' when the rule did not surface a mode. | RouterRuleRow |
$name readonly constructor | string | Rule name or its class FQCN. | RouterRuleRow |
$route readonly constructor | string | Route target the rule maps to (for example, site/index or <controller>/<action>). | RouterRuleRow |
$suffix readonly constructor | string | URL suffix declared on the rule (for example, .html), or '' when the rule inherits the global suffix. | RouterRuleRow |
$type readonly constructor | string | Rule type, typically the FQCN of the matching rule class. | RouterRuleRow |
$verb readonly constructor | string | Comma-separated verb list (for example, GET,), or '' when the rule does not restrict verbs. | RouterRuleRow |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a Router Rules table row. | RouterRuleRow |
from() static | Narrows the loose array shape captured by the Router Rules model into a typed row. | RouterRuleRow |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $name, string $route, string $verb, string $suffix, string $mode, string $type)Creates a Router Rules table row.
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$route | string | |
$verb | string | |
$suffix | string | |
$mode | string | |
$type | string |
from()
Section titled “from() ”public static function from(array<string, mixed> $row): selfNarrows the loose array shape captured by the Router Rules model into a typed row.
Parameters
| Parameter | Type | Description |
|---|---|---|
$row | array<string, | Source row. |
Returns
self