简体   繁体   中英

zend bootstrap: for each module

Is it good or bad 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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM