gak*_*hov 10 php middleware symfony
我正在寻找一种方法来为应用程序创建类似Django的中间件Symfony2.基本上,我需要预处理每次 request谈到前Controllers和后处理每一个 response之后Controllers,但它涉及到用户面前.
有什么想法吗?
小智 18
在Symfony2中你不需要中间件.有一些叫做内核事件的东西.
http://symfony.com/doc/current/book/internals.html#events
您可能想看看kernel.request和kernel.response