An open API service indexing awesome lists of open source software.

https://github.com/bermudaphp/pipeline

Psr-15 middleware pipeline
https://github.com/bermudaphp/pipeline

middleware middleware-dispatchers middleware-pipeline middlewares php php-middleware pipeline psr-15 psr-7

Last synced: about 1 month ago
JSON representation

Psr-15 middleware pipeline

Awesome Lists containing this project

README

        

# Pipeline
Psr-15 middleware pipeline

## Installation

```bash
composer require bermudaphp/pipeline
```

## Usage

```php

use function Bermuda\Pipeline\pipe;

pipe()->pipe($myFirstMiddlewareInstance)
->pipe($mySecondMiddlewareInstance)
->process($serverRequest, $requestHandler);
```

## Request handling

```php

pipe([$myFirstMiddlewareInstance, $mySecondMiddlewareInstance])->handle($serverRequest);
```