# RequestRoutingViewFactory

> Adapts Yii2 request data, the captured URL-rule trace, and the live URL manager configuration to the shared Request routing view.

[API reference](/docs/api/index.md) › [Debug](/docs/extensions/debug/reference/index.md) › [panels](/docs/extensions/debug/reference/panels/index.md) › [request](/docs/extensions/debug/reference/panels/request/index.md) › RequestRoutingViewFactory

| final class | `yii\debug\panels\request\RequestRoutingViewFactory` |
| --- | --- |
| Source | [`src/panels/request/RequestRoutingViewFactory.php`](https://github.com/yii2-extensions/debug/blob/main/src/panels/request/RequestRoutingViewFactory.php#L40) |

Adapts Yii2 request data, the captured URL-rule trace, and the live URL manager configuration to the shared
Request routing view.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`fromRequestData()`](#method-fromRequestData) static | Builds the composed routing view without evaluating controller action maps. | `RequestRoutingViewFactory` |

## Method details

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

```php
public static function fromRequestData(array<array-key, mixed> $data, PHPForge\Debug\Panel\Router\RouterSnapshot|null $snapshot, PHPForge\Debug\Storage\ExceptionSnapshot|null $error, yii\debug\models\router\RouterRules|null $routerRules = null): PHPForge\Debug\Panel\Request\Routing\RequestRoutingView
```

Builds the composed routing view without evaluating controller action maps.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$data` | `array<array-key, mixed>` | Captured Request panel data. |
| `$snapshot` | `PHPForge\Debug\Panel\Router\RouterSnapshot\|null` | Captured Router panel trace, when available. |
| `$error` | `PHPForge\Debug\Storage\ExceptionSnapshot\|null` | Captured Router collector or hydration failure, when available. |
| `$routerRules` | [`yii\debug\models\router\RouterRules`](/docs/extensions/debug/reference/models/router/routerrules/index.md)`\|null` | Injected live URL-manager view model; primarily useful to avoid rescanning the manager when the caller already has it. |

**Returns**

`PHPForge\Debug\Panel\Request\Routing\RequestRoutingView`: Composed view of the current route and the application route inventory.