开发者

Code ran before every action within symfony

开发者 https://www.devze.com 2022-12-26 02:54 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消