PHPackages                             eserozvataf/scabbia2-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. [Framework](/categories/framework)
4. /
5. eserozvataf/scabbia2-router

AbandonedArchivedLibrary[Framework](/categories/framework)

eserozvataf/scabbia2-router
===========================

Scabbia2 Router Component

v0.1.2(10y ago)526Apache-2.0PHPPHP &gt;=5.6.0

Since Sep 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/eserozvataf/scabbia2-router)[ Packagist](https://packagist.org/packages/eserozvataf/scabbia2-router)[ Docs](http://www.scabbiafw.com/)[ RSS](/packages/eserozvataf-scabbia2-router/feed)WikiDiscussions master Synced 2mo ago

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

Scabbia2 Router Component
=========================

[](#scabbia2-router-component)

[This component](https://github.com/eserozvataf/scabbia2-router) is a simple routing dispatcher which resolves and dispatchs the routes to callbacks or controllers.

[![Build Status](https://camo.githubusercontent.com/26f55f163bbcef50c2eb7125951ded050f74484cf84896db3fee7e113e27f24b/68747470733a2f2f7472617669732d63692e6f72672f657365726f7a76617461662f73636162626961322d726f757465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/eserozvataf/scabbia2-router)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/94dac129a10d840346d7d72ae2ea24fdde8f77d8e8f5d25bd7ff0c89d838f40c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f657365726f7a76617461662f73636162626961322d726f757465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/eserozvataf/scabbia2-router/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/2cd34eb1237ceae9b4ef770f2771a251a4bd66dd8573d0d1c23b4cddd9902ca7/68747470733a2f2f706f7365722e707567782e6f72672f657365726f7a76617461662f73636162626961322d726f757465722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/eserozvataf/scabbia2-router)[![Latest Stable Version](https://camo.githubusercontent.com/429dcbbd5991ddab453fb2c1937d290e80838edea5317d31c86d6373031c9c80/68747470733a2f2f706f7365722e707567782e6f72672f657365726f7a76617461662f73636162626961322d726f757465722f762f737461626c65)](https://packagist.org/packages/eserozvataf/scabbia2-router)[![Latest Unstable Version](https://camo.githubusercontent.com/47da9e25e274110e3afd200c403e55d44e4aaec7e46e6a87828fb24f62154d6b/68747470733a2f2f706f7365722e707567782e6f72672f657365726f7a76617461662f73636162626961322d726f757465722f762f756e737461626c65)](https://packagist.org/packages/eserozvataf/scabbia2-router)[![Documentation Status](https://camo.githubusercontent.com/1ebeb3aa2c5cce31b6bf29a03a59cd40727e8fe235ba9ca28824ef1330a81328/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f73636162626961322d646f63756d656e746174696f6e2f62616467652f3f76657273696f6e3d6c6174657374)](https://readthedocs.org/projects/scabbia2-documentation)

Usage
-----

[](#usage)

### Creating route definitions

[](#creating-route-definitions)

```
use Scabbia\Router\RouteCollection;

$routes = new RouteCollection();

// adding a static route
$routes->addRoute('GET', '/about', 'AboutController::IndexAction');

// adding a static route with multiple http methods
$routes->addRoute(['GET', 'POST'], '/about', 'AboutController::IndexAction');

// adding a dynamic route
$routes->addRoute('GET', '/users/profile/{id:[a-z]+}', 'UsersController::ProfileAction');

// adding a dynamic route with a routing name
$routes->addRoute('GET', '/users/posts/{id:[a-z]+}', 'UsersController::PostsAction', 'user/posts');
```

### Saving route definitions

[](#saving-route-definitions)

```
file_put_contents('routes.json', json_encode($routes->save()));
```

### Loading route definitions back

[](#loading-route-definitions-back)

```
$routes = json_decode(file_get_contents('routes.json'));
```

### Dispatching a route

[](#dispatching-a-route)

```
use Scabbia\Router\Router;

$router = new Router($routes); // initialize a new router with route definitions
$route = $router->dispatch('GET', '/about');

if ($route['status'] === Router::FOUND) {
  call_user_func($route['callback'], ...$route['parameters']);
}
```

### Reverse Routing with names

[](#reverse-routing-with-names)

```
use Scabbia\Router\Router;

$router = new Router($routes); // initialize a new router with route definitions

echo $router->path('users/posts', [ 'id' => 'eser' ]);
```

Links
-----

[](#links)

- [List of All Scabbia2 Components](https://github.com/eserozvataf/scabbia2)
- [Documentation](https://readthedocs.org/projects/scabbia2-documentation)
- [Twitter](https://twitter.com/eserozvataf)
- [Contributor List](contributors.md)
- License Information [I](LICENSE-Apache) [II](LICENSE-Flask)

Contributing
------------

[](#contributing)

It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome. All contributions should be filed on the [eserozvataf/scabbia2-router](https://github.com/eserozvataf/scabbia2-router) repository.

- To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
- To report a bug: If something does not work, please report it using GitHub issues.
- To support: [![Donate](https://camo.githubusercontent.com/630a83896c8ab4a5af0f79046098e3d8713112304fd119d86fa5957a0ecc5159/68747470733a2f2f696d672e736869656c64732e696f2f67726174697061792f657365726f7a76617461662e737667)](https://gratipay.com/eserozvataf/)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3892d ago

### Community

Maintainers

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

---

Top Contributors

[![eser](https://avatars.githubusercontent.com/u/866558?v=4)](https://github.com/eser "eser (14 commits)")

---

Tags

routerroutingscabbialarukediscabbia2scabbiafw

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/eserozvataf-scabbia2-router/health.svg)

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

###  Alternatives

[klein/klein

A lightning fast router for PHP

2.7k1.1M31](/packages/klein-klein)[pecee/simple-router

Simple, fast PHP router that is easy to get integrated and in almost any project. Heavily inspired by the Laravel router.

696214.6k17](/packages/pecee-simple-router)[izniburak/router

simple router class for php

23522.6k7](/packages/izniburak-router)[thewunder/croute

Convention based routing for PHP

1317.4k](/packages/thewunder-croute)

PHPackages © 2026

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