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

ActiveLibrary

abollinger/router
=================

A lightweight router for every PHP app.

v2.0.0(1mo ago)02711MITPHP

Since Apr 9Pushed 1mo agoCompare

[ Source](https://github.com/Antoine-Bollinger/router)[ Packagist](https://packagist.org/packages/abollinger/router)[ RSS](/packages/abollinger-router/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (23)Used By (1)

Abollinger/Router
=================

[](#abollingerrouter)

This router is used in the partez framework (see on **[Packagist](https://packagist.org/packages/abollinger/partez)**). It provides a set of functions to help you create a smart router for you web app or API.

[![Total Downloads](https://camo.githubusercontent.com/5e6b0aa04cfe0113948008d3157a4cf6953d47183655812d9af49af51a1656ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61626f6c6c696e6765722f726f75746572)](https://packagist.org/packages/abollinger/router)[![Latest Stable Version](https://camo.githubusercontent.com/0eede588d77b6b312bf9bbc08186c6f0e10c77c399a08c967e203115ea840501/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61626f6c6c696e6765722f726f75746572)](https://packagist.org/packages/abollinger/router)[![License](https://camo.githubusercontent.com/7b9326968ae434b38b0bba0fc5df9082bc01880c82a94bb056d9fdc215cf21d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61626f6c6c696e6765722f726f75746572)](https://packagist.org/packages/abollinger/router)

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

You can install the router in your project using composer:

```
composer require abollinger/router
```

Usage
-----

[](#usage)

Here a the functions provided:

 Functions in the Classes tree- Abollinger/
    - Router::
        - [getRoutesFromYaml($dir)](#getRoutesFromYaml)
        - [getRoutesFromDirectory($dir)](#getRoutesFromDirectory)

 ### getRoutesFromYaml

[](#getroutesfromyaml)

Retrieves routes from YAML files present in the specified directory.

- `@param string $dir`: The directory containing YAML route files
- `@return array`: An array of parsed routes from YAML files

### getRoutesFromDirectory

[](#getroutesfromdirectory)

Retrieves routes from PHP controller files within the specified directory.

- `@param string $directory`: The directory path containing PHP controller files.
- `@return array`: An array containing extracted routes with their path, name, and controller information.

Classes tree
------------

[](#classes-tree)

```
Abollinger/
└── Router::
    ├── getRoutesFromYaml($dir)
    └── getRoutesFromDirectory($dir)
```

Licence
-------

[](#licence)

This library is licensed under the MIT License. For full license details, see the `LICENCE` file distributed with this source code.

Author
------

[](#author)

Antoine Bollinger Email:

For contributions, issues, or feedback, feel free to contact the author or open a GitHub issue.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance90

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

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

Recently: every ~79 days

Total

22

Last Release

50d ago

Major Versions

v1.2.9 → v2.0.02026-03-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ef76077f29bfc3b32b0b1d21d2f4122af8109f23aa48586ea68d768e01f354f?d=identicon)[antoinebollinger](/maintainers/antoinebollinger)

---

Top Contributors

[![antoinebollinger](https://avatars.githubusercontent.com/u/56133015?v=4)](https://github.com/antoinebollinger "antoinebollinger (24 commits)")

### Embed Badge

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

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

###  Alternatives

[getkirby/cms

The Kirby core

1.5k535.5k352](/packages/getkirby-cms)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)

PHPackages © 2026

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