2017 © Pedro Peláez
 

library double-pass-compatibility

Tools for support double pass middewares in PSR-15

image

php-middleware/double-pass-compatibility

Tools for support double pass middewares in PSR-15

  • Tuesday, July 24, 2018
  • by snapshotpl
  • Repository
  • 1 Watchers
  • 2 Stars
  • 26,628 Installations
  • PHP
  • 9 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 31 % Grown

The README.md

double-pass-compatibility Build Status

This package provide trait and abstract class for your psr-15 middlewares to double pass middewares support. So you can call your middleware in both styles., (*1)

Standard PSR-15 call:, (*2)

$middleware->process($request, $delegate);

Possible call after implements this package:, (*3)

$middleware($request, $response, $next);

Installation

composer require php-middleware/double-pass-compatibility

You can add trait into your middeware:, (*4)

class Middleware implements MiddlewareInterface
{
    use PhpMiddleware\DoublePassCompatibilityTrait;

    public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
       // Implementation and return response
    }
}

Or extend abstract class:, (*5)

class Middleware extend AbstractDoublePassCompatibilityMiddleware implements MiddlewareInterface
{
    public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
       // Implementation and return response
    }
}

The Versions

24/07 2018

dev-master

9999999-dev

Tools for support double pass middewares in PSR-15

  Sources   Download

The Requires

 

The Development Requires

middleware psr psr-7 psr-15

24/07 2018

1.1.0

1.1.0.0

Tools for support double pass middewares in PSR-15

  Sources   Download

The Requires

 

The Development Requires

middleware psr psr-7 psr-15

24/07 2018

dev-php72-support

dev-php72-support

Tools for support double pass middewares in PSR-15

  Sources   Download

The Requires

 

The Development Requires

middleware psr psr-7 psr-15

11/05 2017

1.0.0

1.0.0.0

Tools for support double pass middewares in PSR-15

  Sources   Download

The Requires

 

The Development Requires

middleware psr psr-7 psr-15