stack/callable-http-kernel

基于可调用对象的HttpKernelInterface实现。

v1.0.1 2016-06-18 18:53 UTC

This package is not auto-updated.

Last update: 2024-09-21 13:19:08 UTC


README

基于可调用对象的HttpKernelInterface实现。

主要用于测试stack中间件,并实时模拟HttpKernelInterface。

示例

use Stack\CallableHttpKernel;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

$app = new CallableHttpKernel(function (Request $request) {
    return new Response('Hello World!');
});