PHPackages                             poa/httpserver - 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. poa/httpserver

ActiveLibrary[Framework](/categories/framework)

poa/httpserver
==============

基于POA洋葱圈模型的中间件，定义Http服务器的处理逻辑

0.1.1(4y ago)091MITPHPPHP &gt;=7.4

Since Oct 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/york8/poa-httpserver)[ Packagist](https://packagist.org/packages/poa/httpserver)[ RSS](/packages/poa-httpserver/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (3)Used By (1)

poa-httpserver
==============

[](#poa-httpserver)

[![Latest Version on Packagist](https://camo.githubusercontent.com/43ac2d0b4533a4f914aebcf8c5fb001c664207cf32e8918f74a56c5cba91ebc2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706f612f687474707365727665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/poa/httpserver)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/0f5923b25bb39365c4fb8d7ebaf0c93edd4c5f653f7eddc8f4783822917bcc37/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706f612f687474707365727665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/poa/httpserver)

基于POA洋葱圈模型的中间件，定义Http服务器的处理逻辑

作者
--

[](#作者)

- [York](https://github.com/york8)

安装
--

[](#安装)

```
{
  "require": {
    "poa/httpserver": "~0.1"
  }
}
```

```
composer update
```

或

```
composer install poa/httpserver
```

示例
--

[](#示例)

```
use Poa\Http\Router\Router;
use Poa\Http\Server\HandleExceptionMiddleware;
use Poa\Http\Server\HttpApplication;
use Poa\Http\Server\HttpContext;
use Poa\Http\Server\HttpServerInterface;
use Poa\Middleware\ElapsedTimeMiddleware;
use Poa\Middleware\MiddlewareSystemInterface;

class FpmHttpServer implements HttpServerInterface
{
    protected MiddlewareSystemInterface $application;

    public function start()
    {
        $context = new HttpContext(null, null);
        $app = $this->application;
        $app($context);
    }

    public function stop()
    {
        // do nothing
    }

    public function delegateRequest(MiddlewareSystemInterface $application)
    {
        $this->application = $application;
    }
}

$app = new HttpApplication();
$app->use(new HandleExceptionMiddleware())
    ->use(new ElapsedTimeMiddleware())
    ->use(new Router());

$server = new FpmHttpServer();
$server->delegateRequest($app);
$server->start();
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

Total

2

Last Release

1661d ago

### Community

Maintainers

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

---

Tags

middlewareframeworkgeneratorpoa

### Embed Badge

![Health badge](/badges/poa-httpserver/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.3k86.3M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[yiisoft/yii-middleware

Yii Middleware

21151.3k1](/packages/yiisoft-yii-middleware)[davidepastore/slim-validation

A slim middleware for validation based on Respect/Validation

171223.7k3](/packages/davidepastore-slim-validation)[chubbyphp/chubbyphp-framework

A minimal, highly performant middleware PSR-15 microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.

13544.4k4](/packages/chubbyphp-chubbyphp-framework)

PHPackages © 2026

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