PHPackages                             warnstar/tin - 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. warnstar/tin

ActiveProject[Framework](/categories/framework)

warnstar/tin
============

swoole web project

v0.1.3(7y ago)35MITPHPPHP &gt;=7.0.0

Since Oct 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/warnstar/tin)[ Packagist](https://packagist.org/packages/warnstar/tin)[ RSS](/packages/warnstar-tin/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (10)Versions (5)Used By (0)

tin
===

[](#tin)

### 部署

[](#部署)

#### 安装

[](#安装)

```
git clone https://github.com/warnstar/tin.git
cd tin
composer install

```

#### 启动

[](#启动)

```
php public/index.php

```

### 路由配置

[](#路由配置)

> 任意文件内配置路由对象，然后注入到application中启动

```
// 实例化路由处理器对象
$r = new \Tin\Base\Router();

// 设置全局中间件
$r->addMiddleware(\app\middleware\TestMiddleware::class);

// 路由内设置中间件
$r->get('/mid2', \app\controllers\IndexController::class . '@index')->addMiddleware(\app\middleware\AbcMiddleware::class);

// 设置路由
$r->get('/users', \app\controllers\IndexController::class . '@index');
$r->get('/index/{id:\d+}', \app\controllers\IndexController::class . '@index');

// 设置路由组
$r->group("/test", function(\Tin\Base\Router $r){
    $r->get('/mid', \app\controllers\TestController::class . '@mid');
});
```

请求处理
----

[](#请求处理)

### 获取请求参数

[](#获取请求参数)

> 在action控制器运行

#### 获取请求头

[](#获取请求头)

```
$this->request->getHeaders();
$this->request->getHeader("key");
```

#### 获取请求参数

[](#获取请求参数-1)

```
// query
$this->request->getQueryParams();
$this->request->getQueryParam("key");

// form or json
$this->request->getParsedBodyParam("key" , "default");
$this->request->getParsedBody();
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

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

Total

2

Last Release

2759d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6067095?v=4)[Frank Huang](/maintainers/wchuang)[@wchuang](https://github.com/wchuang)

---

Top Contributors

[![warnstar](https://avatars.githubusercontent.com/u/10740548?v=4)](https://github.com/warnstar "warnstar (54 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/warnstar-tin/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[salamander/webworker

framework

336.3k](/packages/salamander-webworker)

PHPackages © 2026

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