PHPackages                             jinxes/jinxkit - 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. [API Development](/categories/api)
4. /
5. jinxes/jinxkit

ActiveLibrary[API Development](/categories/api)

jinxes/jinxkit
==============

A restful router

05PHP

Since Mar 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Jinxes/Jinxkit)[ Packagist](https://packagist.org/packages/jinxes/jinxkit)[ RSS](/packages/jinxes-jinxkit/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Jinxes/Jinxkit
==============

[](#jinxesjinxkit)

A minimal restful router

This is a mini php route library. At the core of Jinxkit is a RESTful and resource-oriented microkernel. It also integrates a simple filter-controller system and a DI (dependency injection) container.

It is suitable as the basis for some customized web frameworks.

Supported PHP versions
----------------------

[](#supported-php-versions)

I was tested on 5.5 and 7.1 (linux/windows), it work properly

Installation
------------

[](#installation)

```
composer require jinxes/jinxkit dev-master

```

Get start
---------

[](#get-start)

- require the Route

```
require 'vendor/autoload.php';

use Jinxes\Jinxkit\Route;
```

- define a controller and connect to the router

```
class SayHello
{
    public function say($lang)
    {
        echo 'hello ' . $lang;
    }
}

Route::get('sayhello/:str', SayHello::class, 'say');

Route::start();
```

- Open the development Server for test

```
php -S localhost:8080

```

and visit:

```
hello world

```

- embed router defind a embed router

```
Route::get('embed/:str', function($word) {
    echo $word;
});
```

visit:

```
hello

```

- add some filters define a filter class and add for the SayHello router

```
class Filter
{
    public function __invoke()
    {
        $lang = array_shift($this->args);
        if ($lang === 'world') {
            echo 'filter pass ';
        } else {
            return false;
        }
    }
}

Route::get('sayhello/:str', SayHello::class, 'say')->filter([Filter::class]);
```

will show:

```
filter pass
hello world

```

- define a RESTful router

```
class SayHello
{
    public function get()
    {
        echo 'this is a GET request';
    }

    public function say($lang)
    {
        echo 'hello ' . $lang;
    }
}

Route::restful('api', SayHello::class, function($router) {
    $router->get('sayhello/:str', SayHello::class, 'say');
});

Route::start();
```

visit:

```
hello world

```

visit:

```
this is a GET request

```

dependency injection for filter and controller
----------------------------------------------

[](#dependency-injection-for-filter-and-controller)

- Define a Service class

```
class SayService
{
    public function hello()
    {
        echo 'hello ';
    }
}
```

service class is some singleton objects maintenance by DI system
and the construct of services also can be injected

- inject services

```
class SayHello
{
    public function say(SayService $sayService, $lang)
    {
        echo $sayService->hello() . $lang;
    }
}
```

You must put the service in front of all the parameters and declaring with service name
visit:

```
hello world

```

- filter and embed function also support DI container.

#### update by Jinxes

[](#update-by-jinxes-blldxtyahoocom)

###  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

Maturity43

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/2ee0ceafa1e91b5315f63966d229d22f4a393881e88d500cac97f196b5c3d486?d=identicon)[while](/maintainers/while)

---

Top Contributors

[![Jinxes](https://avatars.githubusercontent.com/u/37512869?v=4)](https://github.com/Jinxes "Jinxes (52 commits)")

### Embed Badge

![Health badge](/badges/jinxes-jinxkit/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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