You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
5 months ago | |
|---|---|---|
| .. | ||
| .github | 5 months ago | |
| src | 5 months ago | |
| CHANGELOG.md | 5 months ago | |
| LICENSE | 5 months ago | |
| README.md | 5 months ago | |
| composer.json | 5 months ago | |
README.md
Helper class to create PSR-7 server request
A helper class that can create ANY PSR-7 server request.
Installation
composer require nyholm/psr7-server
Usage
// 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();
Other packages
- nyholm/psr7 - A super fast PSR-7 implementation.
- laminas/laminas-httphandlerrunner - To send/emit PSR-7 responses
