Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/indragunawan/middleware-bundle

Before and After filter implementation by using annotation
https://github.com/indragunawan/middleware-bundle

event-dispatcher middleware php symfony symfony-bundle

Last synced: about 2 months ago
JSON representation

Before and After filter implementation by using annotation

Awesome Lists containing this project

README

        

# MiddlewareBundle

[![license](https://img.shields.io/github/license/IndraGunawan/middleware-bundle.svg?style=flat-square)](https://github.com/IndraGunawan/middleware-bundle/blob/master/LICENSE.md)
[![Travis](https://img.shields.io/travis/IndraGunawan/middleware-bundle.svg?style=flat-square)](https://travis-ci.org/IndraGunawan/middleware-bundle)
[![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/IndraGunawan/middleware-bundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/IndraGunawan/middleware-bundle/?branch=master)
[![Scrutinizer](https://img.shields.io/scrutinizer/g/IndraGunawan/middleware-bundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/IndraGunawan/middleware-bundle/?branch=master)
[![Source](https://img.shields.io/badge/source-IndraGunawan%2Fmiddleware--bundle-blue.svg)](https://github.com/IndraGunawan/middleware-bundle)
[![Packagist](https://img.shields.io/badge/packagist-indragunawan%2Fmiddleware--bundle-blue.svg)](https://packagist.org/packages/indragunawan/middleware-bundle)

Middleware bundle provide simple implementation of [symfony before and after filter](https://symfony.com/doc/current/event_dispatcher/before_after_filters.html) by using annotation. this implementation is inspired by Laravel Middleware.

## Installation

If your project already uses Symfony Flex, execute this command to
download, register and configure the bundle automatically:

```bash
composer require indragunawan/middleware-bundle
```

If you install without using Symfony Flex, first add the bundle by using composer then enable the bundle by adding `new Indragunawan\MiddlewareBundle\IndragunawanMiddlewareBundle()` to the list of registered bundles in the app/AppKernel.php file of your project.

## Create middleware service

```php