2017 © Pedro Peláez
 

library jenga

image

madewithlove/jenga

  • Friday, April 7, 2017
  • by hannesvdvreken
  • Repository
  • 1 Watchers
  • 3 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Jenga

Build Status, (*1)

PSR-15 middleware stack builder with lazy resolving of middlewares from PSR-11 containers., (*2)

Installation

composer require madewithlove/jenga

Usage

$middleware = [
    new RobotsMiddleware(),
    RouterMiddleware::class,
];

$stack = new Stack($psrContainer, $middlewares);

$psrResponse = $stack->call($psrServerRequest);

You can also plug in the Stack object into a different PSR-15 middleware chain, because it implements the MiddlewareInterface., (*3)

$psrResponse = $stack->process($psrServerRequest, $delegate);

Example

You can run an example application, if you have cloned this repository, using:, (*4)

php -S 0.0.0.0:8000 example/index.php

Testing

After cloning this project, install its dependencies and run the test suite:, (*5)

composer install
vendor/bin/phpunit

License

MIT, (*6)

The Versions

07/04 2017
07/04 2017