I'm looking for a way to create a Django-like middleware for an application on Symfony2. Basically, I need to preprocess every request before it comes to Controllers and postprocess every response after Controllers, but before it comes to user.
Any thoughts?
You don't need a middle ware for this in Symfony2. There are things called Kernel Events.
http://symfony.com/doc/current/book/internals.html#events
You may want to have a look at kernel.request and kernel.response
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With