2017 © Pedro Peláez
 

library psr-07-bridge

PSR-07 bridge for Zapheus framework.

image

zapheus/psr-07-bridge

PSR-07 bridge for Zapheus framework.

  • Wednesday, April 18, 2018
  • by rougin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

PSR-07 (HTTP Message) Bridge

![Latest Version on Packagist][ico-version] Software License Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

Converts PSR-07 packages to Zapheus HTTP messages and vice versa. Also contains an implementation of PSR-07., (*2)

Installation

Install PSR-07 Bridge via Composer:, (*3)

``` bash $ composer require zapheus/psr-07-bridge, (*4)


## Basic Usage ### PSR-07 to Zapheus Install a PSR-07 compliant package first (e.g [Diactoros](https://github.com/zendframework/zend-diactoros)): ``` bash $ composer require zendframework/zend-diactoros

``` php use Zapheus\Bridge\Psr\Zapheus\Request; use Zend\Diactoros\ServerRequestFactory;, (*5)

$psr = ServerRequestFactory::fromGlobals();, (*6)

// Zapheus\Http\Message\RequestInterface $request = new Request($psr);, (*7)


### Zapheus to PSR-07 ``` php use Zapheus\Bridge\Psr\Interop\ServerRequest; use Zapheus\Container\Container; use Zapheus\Http\Message\RequestInterface; use Zapheus\Http\MessageProvider; $interface = RequestInterface::class; $provider = new MessageProvider; $container = $provider->register(new Container); $zapheus = $container->get($interface); // Psr\Http\Message\ServerRequestInterface $request = new ServerRequest($zapheus);

Changelog

Please see CHANGELOG for more information what has changed recently., (*8)

Testing

bash $ composer test, (*9)

Credits

License

The MIT License (MIT). Please see LICENSE for more information., (*10)

The Versions

18/04 2018

dev-master

9999999-dev https://github.com/zapheus/psr-07-bridge

PSR-07 bridge for Zapheus framework.

  Sources   Download

MIT

The Requires

 

The Development Requires

psr-7 bridge http-message zapheus

18/04 2018

v0.1.2

0.1.2.0 https://github.com/zapheus/psr-07-bridge

PSR-07 bridge for Zapheus framework.

  Sources   Download

MIT

The Requires

 

The Development Requires

psr-7 bridge http-message zapheus

17/04 2018

v0.1.1

0.1.1.0 https://github.com/zapheus/psr-07-bridge

PSR-07 bridge for Zapheus framework.

  Sources   Download

MIT

The Requires

 

The Development Requires

psr-7 bridge http-message zapheus

13/04 2018

v0.1.0

0.1.0.0 https://github.com/zapheus/psr-07-bridge

PSR-07 bridge for Zapheus framework.

  Sources   Download

MIT

The Requires

 

The Development Requires

psr-7 bridge http-message zapheus