- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
经过大量(重新)阅读和谷歌搜索,我得出了结论:
关于 ZF2 应用程序,实际区别是什么在 bootstrap() 和 run() 之间?
为什么要用一个而不是另一个?
为什么 ZF2 骨架使用 run() 而没有提及 bootstrap()哪里?
如果使用时一切正常,那么什么时候使用 bootstrap()运行()?
run() 是否隐式调用 boostrap()?
最佳答案
我不确定你为什么想知道这个深度的细节。如果更改,差异不会真正影响。
对于 ZF2 应用程序,bootstrap() 和 run() 之间的实际区别是什么?
bootstrap()
是一个独立的类结构。 run()
是 Application 类的一部分。
为什么要用一个而不是另一个?
Bootstrap 先于其他任何东西运行。它还初始化各种类的init函数(不是抽象的)。运行之后运行。换句话说,Bootstrap 会装满枪,Run 就像扣动扳机。
为什么 ZF2 骨架使用 run() 而没有在任何地方提及 bootstrap()?
Skeleton 是一个基本的骨架应用程序,它在框架的 Bootstrap 已经被调用之后被调用!
那么,如果在使用 run() 时一切正常,那么什么时候会使用 bootstrap()?
不,正如我所说,Bootstrap 就像给枪上膛,而 Run 就像扣动扳机。如果您没有要加载的内容,则无法运行任何内容。如果未隐式调用,Run 将调用 Bootstrap。
run() 是否隐式调用 boostrap()?
理想情况下,它应该。
关于php - ZF2 : What is the difference between bootstrap() and run() at the Application level?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15380462/
我是一名优秀的程序员,十分优秀!