2017 © Pedro Peláez
 

library aura-router-nested-middleware

PSR-15 middleware for Aura Router with nested-middleware route handling

image

jerowork/aura-router-nested-middleware

PSR-15 middleware for Aura Router with nested-middleware route handling

  • Wednesday, February 7, 2018
  • by jerowork
  • Repository
  • 1 Watchers
  • 2 Stars
  • 147 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 3 % Grown

The README.md

Aura Router nested middleware

PSR-15 middleware for Aura Router with nested-middleware route handling., (*1)

Installation

Install via Composer:, (*2)

$ composer require jerowork/aura-router-nested-middleware

Usage

use Aura\Router\RouterContainer;
use Jerowork\AuraRouterNestedMiddleware\AuraRouterNestedMiddleware;

// setup Aura Router
$router = new RouteContainer();

// add middleware to your general middleware queue
$middleware[] = new AuraRouterNestedMiddleware($router);

// add routes with middleware
$map = $router->getMap();

$map->get('home', '/', [
    new SomeMiddleware(),
    new AnotherMiddleware(),
    new HomeAction(),
]);

// route with no other middleware than the blog action
$map->get('blog', '/blog', new BlogAction());

Http actions with PSR-15 implementation

From now on every http action can implement Interop\Http\Server\MiddlewareInterface., (*3)

Example action:, (*4)

use Interop\Http\Server\MiddlewareInterface;

class HomeAction implements MiddlewareInterface
{
    /**
     * @inheritDoc
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $response = $handler->handle($request);
        $response->getBody()->write('Hello world!');
        return $response;
    }
}

The Versions

07/02 2018

dev-master

9999999-dev

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

The Development Requires

aura middleware psr-7 router psr-15

07/02 2018

0.4.1

0.4.1.0

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

The Development Requires

aura middleware psr-7 router psr-15

23/01 2018

0.4.0

0.4.0.0

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 psr-15

19/11 2017

0.3.1

0.3.1.0

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

middleware psr-7 psr-15

19/11 2017

0.3.0

0.3.0.0

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

middleware psr-7 psr-15

04/11 2017

0.2.1

0.2.1.0

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

middleware psr-7 psr-15

04/11 2017

0.2.0

0.2.0.0

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

middleware psr-7 psr-15

01/10 2017

0.1.2

0.1.2.0

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

middleware psr-7 psr-15

30/09 2017

0.1.1

0.1.1.0

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

middleware psr-7 psr-15

04/06 2017

0.1.0

0.1.0.0

PSR-15 middleware for Aura Router with nested-middleware route handling

  Sources   Download

MIT

The Requires

 

middleware psr-7 psr-15