Provides utility a class to handle a PSR-7 server request.
This package provides a utility class that can create a PSR-7 server request.
The recommnended way to install this library is through composer:
composer require fulmen/psr7-server
use Fulmen\Psr7\Factory\ServerRequestFactory; use Fulmen\Psr7\Factory\UriFactory; use Fulmen\Psr7\Factory\StreamFactory; use Fulmen\Psr7\Factory\UploadedFileFactory; use Fulmen\Psr7\Server\ServerRequestCreator; // Here is fulmen/http-message as an example $requestFactory = new ServerRequestFactory(); $uriFactory = new UriFactory(); $streamFactory = new StreamFactory(); $uploadedFileFactory = new UploadedFileFactory(); $requestCreator = new ServerRequestCreator($requestFactory, $uriFactory, $streamFactory, $uploadedFileFactory); // Create a request from the current environment variables $request = $requestCreator->fromGlobals();
Please see the changelog for change details.
The package is an open-sourced software licensed under the MIT License.