Skip to content
PHP Ecosystem
Explore

ActionRouteRow

API reference › Debug Core › Panel › Router › ActionRouteRow

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

Typed view-model for one row in the Action Routes table.

PropertyTypeDescriptionDefined by
$action readonly constructorstringAction FQCN used as the table key (for example, app\controllers\SiteController::actionIndex).ActionRouteRow
$count readonly constructorintNumber of rules tested before the match, or 0 when no rule was tested.ActionRouteRow
$route readonly constructorstringRoute that resolves to the action (for example, site/index).ActionRouteRow
$rule readonly constructorstringFirst rule that matched the route, or '' when no rule was tested or none matched.ActionRouteRow
MethodDescriptionDefined by
__construct()Creates an Action Routes table row.ActionRouteRow
from() staticNarrows the loose array shape ($actionRoutes->routes[$action]) into a typed row.ActionRouteRow
public function __construct(string $action, string $route, string $rule, int $count)

Creates an Action Routes table row.

Parameters

ParameterTypeDescription
$actionstring
$routestring
$rulestring
$countint
public static function from(string $action, array<string, mixed> $row): self

Narrows the loose array shape ($actionRoutes->routes[$action]) into a typed row.

Parameters

ParameterTypeDescription
$actionstringAction FQCN used as the row key.
$rowarray<string, mixed>Source row.

Returns

self