开发者

zend bootstrap: for each module

Is it good or ba开发者_高级运维d practice to create separate bootstrap for each module. They make the project look a lot less disorganized in my opinion so I'd like to know if it's the norm to have them in each module.


For ZF1, there currently is no official recommendation to my knowledge. Your best bet is

  • Matthew Weier O'Phinney - Module Bootstraps in Zend Framework: Do's and Don'ts


I don't think there's any "best practise", like much in ZF it's just another choice available to you.

Personally, I rarely use them. Module bootstraps are a nice idea, but since by default all module bootstraps run on every request I don't really see the point.

There are some examples of how to make module bootstraps only run when the current request is for that module, Matthew's article has some good links.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜