简体   繁体   English

了解application.ini和引导程序

[英]Understanding the application.ini and the bootstrap

I have been trying to figure this out for quite a while, but what is the exact difference between the application.ini and the bootstrap file in a Zend Project? 我已经尝试了好一阵子了,但是application.ini和Zend项目中的bootstrap文件之间的确切区别是什么?

Both seem to be used to add resources, helpers, etc. But i do not quite understand what the difference is between adding something in the bootstrap or adding it trough the application.ini. 两者似乎都用于添加资源,助手等。但是我不太了解在引导程序中添加内容还是通过application.ini添加内容之间的区别。 What is the benefit of either approach against the other? 两种方法相对于另一种方法有什么好处?

Is there anyone who could explain this to me? 有谁可以向我解释一下吗?

The configuration set out in application.ini drives the built in (and any 3rd party or custom built) application resource plugins . application.ini设置的配置驱动内置的(以及任何第三方或自定义构建的) 应用程序资源插件 You are limited by what the resource plugins can do with your config settings. 您受到资源插件对配置设置的限制。

Any code in your Bootstrap class is meant to offer more fine-grained customisation. Bootstrap类中的任何代码都旨在提供更细粒度的自定义。 Here you can do anything you're able to put into PHP code. 在这里,您可以做任何可以放入PHP代码中的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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