Skip to content

Helper classes to use any PSR7 implementation as your main request and response

License

Notifications You must be signed in to change notification settings

Nyholm/psr7-server

Repository files navigation

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

About

Helper classes to use any PSR7 implementation as your main request and response

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 11

Languages