PHPackages                             boke0/skull - 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. boke0/skull

ActiveLibrary[API Development](/categories/api)

boke0/skull
===========

PSR7対応のルーティングライブラリです。

2.2.4(6y ago)0391GPL-3.0-or-laterPHPCI failing

Since Dec 14Pushed 6y ago1 watchersCompare

[ Source](https://github.com/boke0/skull)[ Packagist](https://packagist.org/packages/boke0/skull)[ RSS](/packages/boke0-skull/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (7)Versions (13)Used By (1)

Skull
=====

[](#skull)

特になにもしないマイクロフレームワークシリーズ「骨 - Hone -」のルーティング機構です。

インストール
------

[](#インストール)

composerを使ってインストールできます。

```
composer require boke0/skull
```

使い方
---

[](#使い方)

### ルートの定義

[](#ルートの定義)

ルートはリクエスト時のメソッドごとに定義することができます。

```

```

第二引数に指定しているのは、マッチ時に実行する関数名です。クロージャを直接指定することも可能です。 また、すべてのメソッドに対してルーティングする場合はanyメソッドを用います。

```
...

$router->any("/spam","hello_any");

...
```

複数のメソッドに対して一括でルーティングする場合はmapメソッドを用います。

```
...

$router->map("/spam","hello_any");

...
```

### ルーティング

[](#ルーティング)

ルート定義後にmatchメソッドにパスを与えることでルーティングを実行できます。

```

```

matchメソッドはルート定義時に指定した関数名を返却します。

### PSR15ミドルウェア

[](#psr15ミドルウェア)

PSR15準拠のミドルウェアを実装した同梱のDispatcherクラスを利用することで、PSRに準拠したフレームワークに組み込むことができます。

```

```

- Dispatcherクラス
    - 引数
        - $router: Routerクラスインスタンス
        - $container: DIコンテナインスタンス

生成したインスタンスをミドルウェアとしてリクエストハンドラなどに受け渡すことでPSR7準拠のリクエストインターフェースに対してルーティングが行われます。

また、Dispatcherを利用したルーティングを行う場合、`.`で区切られた関数名は前半をクラス名、後半をメソッド名として認識します。`.`で区切らずにクラス名のみを指定した場合は、そのクラスのhandleメソッドが実行されます。

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Recently: every ~20 days

Total

12

Last Release

2247d ago

Major Versions

1.4 → 2.02019-12-21

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/boke0-skull/health.svg)

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[windwalker/framework

The next generation PHP framework.

25639.1k1](/packages/windwalker-framework)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)

PHPackages © 2026

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