Make middleware

how to make middleware in phalcon 3.0 I found this tutorial https://docs.phalconphp.com/en/latest/reference/micro.html#middleware-events but in this case I don't use phalcon micro for now in my routing , I use this use Phalcon\Mvc\Router; any idea ? help please.

edited Nov '16

Middleware events are only available in Micro.

BUT, in full MVC you can use similar approach with Events Manager.

edited Nov '16

We plan to full PSR7 support out of box in Phalcon since v4.0.0. Right now you can use events, or Micro app, or any other workaround like https://github.com/SidRoberts/phalcon-authmiddleware