dlundgren/pipeware

Pipelined PSR-15 middleware

3.0.0 2019-06-18 03:41 UTC

This package is auto-updated.

Last update: 2024-12-18 16:52:57 UTC


README

Latest Version on Packagist Software License Total Downloads

This is an example library for how to treat Middleware as a pipeline.

This uses the SyberIsle Pipeline as it's pipeline implementation.

Usage

$stack = new \Pipeware\Stack(
	new \Pipeware\Containerized($container), // any psr-11 compatible container
	new \Pipeware\Processor()
);

// append your responder
$stack->append(new Responder());

// append your error handler
$stack->append(new ErrorHandler());

// have the stack handle your request
$response = $stack->handle($request);

// do something with your response if needed

Change log

Please see CHANGELOG for more information what has changed.

Credits

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.