kodus/psr7-server

此包已被废弃,不再维护。作者建议使用 nyholm/psr7-server 包。

处理PSR-7服务器请求的辅助类

1.0.1 2019-06-17 10:48 UTC

This package is auto-updated.

Last update: 2022-12-07 10:46:15 UTC


README

Latest Version Build Status Code Coverage Quality Score Total Downloads Monthly Downloads Software License

一个可以创建任何PSR-7服务器请求的辅助类。

安装

composer require nyholm/psr7-server

使用方法

// Instanciate ANY PSR-17 factory implementations. Here is nyholm/psr7 as an example
$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory();

$creator = new \Nyholm\Psr7Server\ServerRequestCreator(
    $psr17Factory, // ServerRequestFactory
    $psr17Factory, // UriFactory
    $psr17Factory, // UploadedFileFactory
    $psr17Factory  // StreamFactory
);

$serverRequest = $creator->fromGlobals();

其他包