PHPackages                             mikeismint/fruit - 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. mikeismint/fruit

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

mikeismint/fruit
================

08PHP

Since Apr 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mikeismint/Fruit.php)[ Packagist](https://packagist.org/packages/mikeismint/fruit)[ RSS](/packages/mikeismint-fruit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Fruit.php
=========

[](#fruitphp)

My first attempt at a simple PHP router. Influenced by [AltoRouter](https://github.com/dannyvankooten/AltoRouter)

Usage
-----

[](#usage)

```
$router = new Fruit();

// map single route
$router->addRoute('GET', '/', 'Controller#Method');

// map post details page
$router->addRoute('GET', '/^posts\/id\/(?P\d+)$/', 'Controller#Method');

// map multiple routes
$router->addRoutes(array(
    array('GET', '/', 'Controller#Method'),
    array('GET', '/^posts\/id\/(?P\d+)$/', 'Controller#Method'),
));
```

Other features
--------------

[](#other-features)

- Accepts multiple HTTP methods separated by `|`
- Uses regex to match URL pattern
- Accepts optional fourth parameter to name routes

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/759ffe3036645bf1f223036b9e24fc5f10c0818675b559a4234c39a8410bde11?d=identicon)[mikeismint](/maintainers/mikeismint)

---

Top Contributors

[![mikekwilson](https://avatars.githubusercontent.com/u/6075665?v=4)](https://github.com/mikekwilson "mikekwilson (6 commits)")

### Embed Badge

![Health badge](/badges/mikeismint-fruit/health.svg)

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

PHPackages © 2026

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