rnr1721 / psr7-server
处理PSR-7服务器请求的辅助类
1.0.0
2023-05-11 14:03 UTC
Requires
- php: ^7.1 || ^8.0
- psr/http-factory: ^1.0
- psr/http-message: ^2.0
Requires (Dev)
- nyholm/nsa: ^1.1
- nyholm/psr7: ^1.3
- phpunit/phpunit: ^7.0 || ^8.5 || ^9.3
This package is auto-updated.
Last update: 2024-09-11 16:56:11 UTC
README
一个可以创建任何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();
其他包
- nyholm/psr7 - 一个超快的PSR-7实现。
- laminas/laminas-httphandlerrunner - 用于发送/触发PSR-7响应