# ActionRouteRow

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

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › [Router](/docs/extensions/debug-core/reference/panel/router/index.md) › ActionRouteRow

| final readonly class | `PHPForge\Debug\Panel\Router\ActionRouteRow` |
| --- | --- |
| Source | [`src/Panel/Router/ActionRouteRow.php`](https://github.com/php-forge/debug-core/blob/main/src/Panel/Router/ActionRouteRow.php#L12) |

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

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-action"></span>`$action` readonly constructor | `string` | Action FQCN used as the table key (for example, `app\controllers\SiteController::actionIndex`). | `ActionRouteRow` |
| <span id="property-count"></span>`$count` readonly constructor | `int` | Number of rules tested before the match, or `0` when no rule was tested. | `ActionRouteRow` |
| <span id="property-route"></span>`$route` readonly constructor | `string` | Route that resolves to the action (for example, `site/index`). | `ActionRouteRow` |
| <span id="property-rule"></span>`$rule` readonly constructor | `string` | First rule that matched the route, or `''` when no rule was tested or none matched. | `ActionRouteRow` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates an Action Routes table row. | `ActionRouteRow` |
| [`from()`](#method-from) static | Narrows the loose array shape (`$actionRoutes->routes[$action]`) into a typed row. | `ActionRouteRow` |

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct(string $action, string $route, string $rule, int $count)
```

Creates an Action Routes table row.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$action` | `string` |  |
| `$route` | `string` |  |
| `$rule` | `string` |  |
| `$count` | `int` |  |

### from() <span id="method-from"></span>

```php
public static function from(string $action, array<string, mixed> $row): self
```

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

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$action` | `string` | Action FQCN used as the row key. |
| `$row` | `array<string, mixed>` | Source row. |

**Returns**

`self`