Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.21 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.21 KB

Aura Filter Middleware

Build Status Coverage Status

Middleware to filter Zend Expressive requests using Aura.Filter.

Requirements

  • PHP >= 7.1

Installation

This package is installable and autoloadable via Composer as knoxzin1/aura-filter-middleware.

composer require knoxzin1/aura-filter-middleware

Example

Add the middleware to your pipeline

$app->pipe(AuraFilterMiddleware::class);

Pass the desired filter to the router options

[
    'name' => 'foo',
    'path' => '/fooo',
    'middleware' => FooMiddleware::class,
    'allowed_methods' => ['POST'],
    'options' => [
        'aura-filter' => FooFilter::class,
    ],
],

The resulting object will be avaiable with the validationResult attribute name.