terablaze / psr7-server
Helper classes to handle PSR-7 server requests(A fork of nyholm/psr7-server, removing final clause from all classes making them extendable)
dev-master
2023-01-22 19:20 UTC
Requires
- php: >=7.3
- psr/http-factory: ^1.0
- psr/http-message: ^1.0
Requires (Dev)
- nyholm/nsa: ^1.1
- phpunit/phpunit: ^7.0 || ^8.5 || ^9.3
- terablaze/psr7: dev-master
This package is auto-updated.
Last update: 2024-12-23 00:12:48 UTC
README
A helper class that can create ANY PSR-7 server request.
Installation
composer require terablaze/psr7-server
Usage
// Instanciate ANY PSR-17 factory implementations. Here is terablaze/psr7 as an example $psr17Factory = new \Terablaze\Psr7\Factory\Psr17Factory(); $creator = new \Terablaze\Psr7Server\ServerRequestCreator( $psr17Factory, // ServerRequestFactory $psr17Factory, // UriFactory $psr17Factory, // UploadedFileFactory $psr17Factory // StreamFactory ); $serverRequest = $creator->fromGlobals();
Other packages
- terablaze/psr7 - A super fast PSR-7 implementation.
- laminas/laminas-httphandlerrunner - To send/emit PSR-7 responses