suyuan-breed/vendor/nyholm/psr7-server
chenbo 0cb210aa2e init 2024-01-09 15:59:23 +08:00
..
.github init 2024-01-09 15:59:23 +08:00
src init 2024-01-09 15:59:23 +08:00
CHANGELOG.md init 2024-01-09 15:59:23 +08:00
LICENSE init 2024-01-09 15:59:23 +08:00
README.md init 2024-01-09 15:59:23 +08:00
composer.json init 2024-01-09 15:59:23 +08:00

README.md

Helper class to create PSR-7 server request

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

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