PHPackages                             air-php/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. air-php/routing

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

air-php/routing
===============

A routing library.

v0.1.2(10y ago)03.2k23PHPPHP &gt;=5.5.0

Since Mar 23Pushed 10y ago1 watchersCompare

[ Source](https://github.com/air-php/routing)[ Packagist](https://packagist.org/packages/air-php/routing)[ RSS](/packages/air-php-routing/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (3)Dependencies (2)Versions (3)Used By (3)

Routing
=======

[](#routing)

[![Build Status](https://camo.githubusercontent.com/4ad986f31f563f92b8012e0265869f5a3062aa1aab319ec32767710789126071/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6169722d7068702f726f7574696e672f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/air-php/routing/build-status/master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/15de2c11e37d27fce4cf40e714a8d8001112981cf8b90d1bd58003a1f76ea9f6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6169722d7068702f726f7574696e672f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/air-php/routing/?branch=master)

The routing library includes classes for handling web application routing.

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

[](#installation)

Installation via [Composer](https://getcomposer.org/) is recommended.

```
"require": {
    "air-php/routing": "dev-master"
}

```

Route
-----

[](#route)

The `Route` object represents an application route. It includes:

- A URI
- The type of request the route handles (e.g. GET, POST etc.)
- The target controller to instantiate
- The target controller action to call

Router
------

[](#router)

The `Router` object is responsible for routing a request. It's configured with one or more `Route` objects.

The `route()` method takes a `Request` object (compatible with Air's [request interface](https://github.com/air-php/http/blob/master/src/Request/RequestInterface.php)) and returns a `ResolvedRoute`. The method itself is abstract, allowing you to use routing logic of your choice.

ResolvedRequest
---------------

[](#resolvedrequest)

A `ResolvedRequest` object represents a request which has been resolved by a `Router` object.

It includes the original `Request` and `Route` objects, along with the URI parameters that were matched during routing.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~262 days

Total

2

Last Release

3811d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0480dbebfc68025ad1b27364d96a03d4b891cf763a625a3cd1a473967c282167?d=identicon)[marklocker](/maintainers/marklocker)

---

Top Contributors

[![marklocker](https://avatars.githubusercontent.com/u/2170244?v=4)](https://github.com/marklocker "marklocker (8 commits)")

### Embed Badge

![Health badge](/badges/air-php-routing/health.svg)

```
[![Health](https://phpackages.com/badges/air-php-routing/health.svg)](https://phpackages.com/packages/air-php-routing)
```

###  Alternatives

[ramsey/devtools

A Composer plugin to aid PHP library and application development.

7134.7k26](/packages/ramsey-devtools)[jimbojsb/workman

PHP process forking &amp; daemonizing library

608.8k](/packages/jimbojsb-workman)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
