PHPackages                             transitive/routing - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. transitive/routing

ActiveLibrary[Framework](/categories/framework)

transitive/routing
==================

Routing classes of Transitive MVP framework

2.4.3(2mo ago)01.2k—0%2MITPHPPHP &gt;8.1

Since Jul 31Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/RobinDumontChaponet/TransitiveRouting)[ Packagist](https://packagist.org/packages/transitive/routing)[ RSS](/packages/transitive-routing/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (12)Used By (2)

Transitive\\Routing
===================

[](#transitiverouting)

Routing layer for the Transitive MVP stack.

This package maps request patterns to `Route` objects. A route can point to presenter and view instances, or to presenter and view PHP files that are included at runtime.

[![Latest Stable Version](https://camo.githubusercontent.com/78d3a6e7911208452ba48877d7c1c5748f405624bcef7a73ba51c92714a7bc59/68747470733a2f2f706f7365722e707567782e6f72672f7472616e7369746976652f726f7574696e672f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/transitive/routing)[![License](https://camo.githubusercontent.com/99e334f524444b0835709907b391d1d0d53f1b8d8bc198a447c680f76914b463/68747470733a2f2f706f7365722e707567782e6f72672f7472616e7369746976652f726f7574696e672f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/transitive/routing)

What is included
----------------

[](#what-is-included)

- `Transitive\Routing\Route`: executes a presenter/view pair and transfers presenter data into the view.
- `Transitive\Routing\PathRouter`: resolves requests to files under presenter and view directories.
- `Transitive\Routing\ListRouter`: exact-match router backed by an in-memory route map.
- `Transitive\Routing\ListRegexRouter`: regex-based router with match capture support.
- `Transitive\Routing\FrontController`: interface implemented by front controller packages such as `transitive/core` and `transitive/web`.
- `Transitive\Routing\RoutingException`: domain exception for missing routes and runtime routing failures.

Installation
------------

[](#installation)

```
composer require transitive/routing
```

PHP `8.1+` is required.

Basic usage
-----------

[](#basic-usage)

```
