nyholm/psr7-server

Helper classes to handle PSR-7 server requests

Fund package maintenance!
nyholm
Zegnat

Installs: 304 110

Dependents: 116

Suggesters: 4

Security: 0

Stars: 60

Watchers: 9

Forks: 13

Open Issues: 4

1.0.2 2021-05-12 11:11 UTC

This package is auto-updated.

Last update: 2021-05-12 11:12:03 UTC


README

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