PHPackages                             exgalibas/gin - 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. exgalibas/gin

ActiveLibrary[Framework](/categories/framework)

exgalibas/gin
=============

a simple route based on yii2

1.0(9y ago)312MITPHPPHP &gt;=5.3.0

Since Apr 19Pushed 7y agoCompare

[ Source](https://github.com/exgalibas/Gin)[ Packagist](https://packagist.org/packages/exgalibas/gin)[ Docs](https://github.com/exgalibas/Gin)[ RSS](/packages/exgalibas-gin/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Gin
===

[](#gin)

A simple route for PHP based on yii2. You can get the source code easily by downloading file or using composer.

### Composer

[](#composer)

If you have composer

```
    composer require exgalibas/gin

```

### Using

[](#using)

Use the namaspace

```
use \Exgalibas\Gin\Gin;

```

You can add the routing rules for specified http method like GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS|ANY

```
(new Gin)->get($pattern, $route)

```

### Pattern

[](#pattern)

The Pattern can be ordinary string, formatting regex with name or original regular expression like:

The name in pattern will be used to replace the route if it has &lt;name&gt; or transmit as params

```
// formatting regex
(new Gin)->get("//", "")

```

This rule only match "exgalibas/gin/login" and call function named "login"

```
//ordinary string
(new Gin)->get("exgalibas/gin/login", "login")

```

Just be ordinary regular expression, match like "post/create/10" and call function named "create"

```
//original regular
(new Gin)->get("(post|comment)\/(create|delete)\/\d+", "create")

```

### Route

[](#route)

The Route can be Closure, function name or formatting string like "class|function"

### Example

[](#example)

```
use \Exgalibas\Gin\Gin;

$route = new Gin();

//example, match get url "post/10/create", call_user_func(["post", "create"], ["id" => 10])
$route->get("//", '|');

//delete route rule
$route->deleteRule("//");

//example, match post url "exgalibas/login/10", call closure function([id=>10])
$route->post("exgalibas/login/", function($params){...})

//example, match get url "exgalibas/login/joker", call login(["name" => "joker"])
$route->get("exgalibas/login/", "login")

//parse the request
$route->dispatch();
```

### Error

[](#error)

If dispatch error, exit "404"

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

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

3313d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b1634d29dd8a63e9d8469a4617f68188ddeb92624bcfb108107c6b360d9a65f?d=identicon)[exgalibas](/maintainers/exgalibas)

---

Top Contributors

[![exgalibas](https://avatars.githubusercontent.com/u/26247892?v=4)](https://github.com/exgalibas "exgalibas (10 commits)")

### Embed Badge

![Health badge](/badges/exgalibas-gin/health.svg)

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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