Code ran before every action within symfony
I have code that I want to be executed before every action is called. Are there 开发者_如何学Caction hooks I can use for this?
In a module:
public function preExecute()
{
}
If you want it to be global for all modules, put it in the appConfiguration class, or create a filter.
+1 for filters. events can also be very useful, depending on what you want to do.
精彩评论