什么是 Zend 框架“资源"? [英] What are Zend Framework "Resources"?

查看:26
本文介绍了什么是 Zend 框架“资源"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道问这个问题很愚蠢,我经常在文档中看到这个术语,但我仍然没有被我遇到的这样的上下文所启发.资源"和图书馆"有什么区别.在我的假设中,我得出的结论是它们只是一组加载的类.我想确定我是否正确.但是我不明白为什么他们在 Zend_Application_Resource 上包含 Zend_Cache、Zend_Translate、Zend_Dojo 等的功能.非常感谢,请原谅我的英语.

I know this is quite silly to ask, I oftentimes see this term on the documentation but I still don't get enlightened by such contexts I encounter. What is the difference between "resources" and "libraries". In my assumption I made the conclusion that they are just set of loaded classes. I would like to make sure if I am correct. But I do not comprehend why they included the functionality of the Zend_Cache, Zend_Translate, Zend_Dojo etc. on the Zend_Application_Resource. Thank you very much and please excuse my English.

推荐答案

资源是您在引导过程中通过配置文件初始化的对象,通常可用于整个应用程序.

Resources are objects you initialise during bootstrap via your configuration file and are generally available to your entire application.

这里描述了一组内置资源 - http://framework.zend.com/manual/en/zend.application.available-resources.html

There are a set of built-in resources as described here - http://framework.zend.com/manual/en/zend.application.available-resources.html

您也可以提供自己的.

库是您可以在应用程序中使用的类的集合.对象通常在需要时实例化.

A library is a collection of classes that you may use in your application. Objects are generally instantiated when required.

这篇关于什么是 Zend 框架“资源"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆