PHPackages                             mrjulio/rapture-router - 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. mrjulio/rapture-router

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

mrjulio/rapture-router
======================

Rapture router component

v1.0.1(8y ago)014MITPHPPHP &gt;=7.0.4

Since Jun 15Pushed 8y agoCompare

[ Source](https://github.com/mrjulio/rapture-router)[ Packagist](https://packagist.org/packages/mrjulio/rapture-router)[ Docs](http://rapture.iuliann.ro)[ RSS](/packages/mrjulio-rapture-router/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

Rapture PHP Router
==================

[](#rapture-php-router)

[![PhpVersion](https://camo.githubusercontent.com/e4c64a56977ee968a54eefdf914344ee00dc9a42c47755b9334cb4a862e57123/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e302d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](#)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](#)

A simple fork from the [nikic/FastRoute](https://github.com/nikic/FastRoute) implementation with reverse routing.

It implements the [`GroupCountBased`](http://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html) algorithm.

Requirements
------------

[](#requirements)

- PHP v7.0
- php-pcre

Install
-------

[](#install)

```
composer require mrjulio/rapture-router

```

Quick start
-----------

[](#quick-start)

For more info check `nikic/FastRoute`.

```
// add multiple routes
$router = new \Rapture\Router\Router();
$router->addRoutes([
    ['user-add',   'GET', '/user/add',                     'User\Add'],
    ['user-edit',  'GET', '/user/edit/{id:\d+}[/{check}]', 'User\ViewDate'],
])->processRoutes(); // run once after each routes have been added

// add group
$router->addGroup(
    '/admin/user',
    [
        ['search', 'GET', '/search',        'Search'],
        ['view',   'GET', '/view/{id:\d+}', 'View'],
    ],
)->processRoutes();
// ...is same as...
$router->addRoute('admin-user-search', 'GET', '/admin/user/search', 'Admin\User\Search');
$router->addRoute('admin-user-view', 'GET', '/admin/user/view/{id:\d+}', 'Admin\User\View')
$router->processRoutes();

// [Router::FOUND, 'User\View', ['id' => 100]],
$router->route('GET', '/user/edit/100');

// [Router::NOT_FOUND],
$router->route('POST', '/user/edit/100');

// [Router::NOT_FOUND],
$router->route('GET', '/user/edit/100/'); // trailing slash
```

About
-----

[](#about)

### Author

[](#author)

Iulian N. `rapture@iuliann.ro`

### Testing

[](#testing)

```
cd ./test && phpunit

```

### Credits

[](#credits)

-

### License

[](#license)

Rapture PHP Router is licensed under the MIT License - see the `LICENSE` file for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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 ~156 days

Total

2

Last Release

3097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c050bc4fe5100fc158eaa33a3adbdbf3464a4234b18ac31723d27371b3a56334?d=identicon)[MrJulio](/maintainers/MrJulio)

---

Top Contributors

[![mrjulio](https://avatars.githubusercontent.com/u/1187463?v=4)](https://github.com/mrjulio "mrjulio (5 commits)")

---

Tags

library

### Embed Badge

![Health badge](/badges/mrjulio-rapture-router/health.svg)

```
[![Health](https://phpackages.com/badges/mrjulio-rapture-router/health.svg)](https://phpackages.com/packages/mrjulio-rapture-router)
```

###  Alternatives

[league/iso3166

ISO 3166-1 PHP Library

69536.3M116](/packages/league-iso3166)[league/statsd

A simple library for working with StatsD in PHP.

3514.3M12](/packages/league-statsd)[payum/iso4217

ISO 4217 PHP Library

16312.1M5](/packages/payum-iso4217)[lambdish/phunctional

λ PHP functional library

3612.0M23](/packages/lambdish-phunctional)[dekor/php-array-table

PHP Library for printing associative arrays as text table (similar to mysql terminal console)

296.6M2](/packages/dekor-php-array-table)

PHPackages © 2026

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