2017 © Pedro Peláez
 

library middleware-dispatcher

Simple PSR-15 compliant middleware dispatcher.

image

procurios/middleware-dispatcher

Simple PSR-15 compliant middleware dispatcher.

  • Tuesday, January 30, 2018
  • by tacovandenbroek
  • Repository
  • 6 Watchers
  • 7 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 6 % Grown

The README.md

Middleware Dispatcher

Build Status Coverage Status, (*1)

Simple PSR-15 compliant middleware dispatcher, (*2)

Goal

The goal of this library is to provide a minimal implementation of the PSR-15 specification that is compatible with older callback middleware., (*3)

Installation

composer require procurios/middleware-dispatcher

Usage

See PSR-15 for detailed information about middleware dispatchers., (*4)

use Procurios\Http\MiddlewareDispatcher\Dispatcher;

$dispatcher = (new Dispatcher($myFallbackHandler))
    ->withMiddleware($myMiddleware)
    ->withMiddleware($myApp)
;

$response = $dispatcher->handle($request);

Or add anonymous callback middleware:, (*5)

use Procurios\Http\MiddlewareDispatcher\Dispatcher;

$dispatcher = (new Dispatcher($myFallbackHandler))
    ->withMiddleware($myMiddleware)
    ->withCallback(function (ServerRequestInterface $request, callable $next) {
        // noop
        return $next($request);
    })
    ->withCallback(function (ServerRequestInterface $request, RequestHandlerInterface $handler) {
        // noop
        return $handler->handle($request);
    })
    ->withMiddleware($myApp)
;

$response = $dispatcher->handle($request);

The Versions

30/01 2018

dev-master

9999999-dev

Simple PSR-15 compliant middleware dispatcher.

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http dispatcher psr-15

29/01 2018

1.0.1

1.0.1.0

Simple PSR-15 compliant middleware dispatcher.

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http dispatcher psr-15

27/01 2018

1.0.x-dev

1.0.9999999.9999999-dev

Simple PSR-15 compliant middleware dispatcher.

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http dispatcher psr-15

27/01 2018

1.0.0

1.0.0.0

Simple PSR-15 compliant middleware dispatcher.

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http dispatcher psr-15

01/02 2017

0.1

0.1.0.0

Simple PSR-15 compliant middleware dispatcher.

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http dispatcher psr-15