Skip to content
PHP Ecosystem
Explore

RouterRuleRow

API reference › Debug Core › Panel › Router › RouterRuleRow

final readonly classPHPForge\Debug\Panel\Router\RouterRuleRow
Sourcesrc/Panel/Router/RouterRuleRow.php

Typed view-model for one row in the Router Rules table.

PropertyTypeDescriptionDefined by
$mode readonly constructorstringRouting mode (PARSING ONLY / CREATION ONLY / BOTH), or '' when the rule did not surface a mode.RouterRuleRow
$name readonly constructorstringRule name or its class FQCN.RouterRuleRow
$route readonly constructorstringRoute target the rule maps to (for example, site/index or <controller>/<action>).RouterRuleRow
$suffix readonly constructorstringURL suffix declared on the rule (for example, .html), or '' when the rule inherits the global suffix.RouterRuleRow
$type readonly constructorstringRule type, typically the FQCN of the matching rule class.RouterRuleRow
$verb readonly constructorstringComma-separated verb list (for example, GET, POST), or '' when the rule does not restrict verbs.RouterRuleRow
MethodDescriptionDefined by
__construct()Creates a Router Rules table row.RouterRuleRow
from() staticNarrows the loose array shape captured by the Router Rules model into a typed row.RouterRuleRow
public function __construct(string $name, string $route, string $verb, string $suffix, string $mode, string $type)

Creates a Router Rules table row.

Parameters

ParameterTypeDescription
$namestring
$routestring
$verbstring
$suffixstring
$modestring
$typestring
public static function from(array<string, mixed> $row): self

Narrows the loose array shape captured by the Router Rules model into a typed row.

Parameters

ParameterTypeDescription
$rowarray<string, mixed>Source row.

Returns

self