您的位置:首页 > 其它

18. Magento 细节

2015-09-06 16:34 344 查看
1. Magento 配置文件加载严格按字母顺序,除了模块依赖关系

2. global 节点

main database settings,such as host,database name ,user name,password and
some system values.

connections types(read/write)
database adapter
core module class names


3. default 节点

directory structure real folder names.
system locale
design and theme configuration
system options


4. frontend 节点

routers
translations files
layout xml files
observers declarations


5. catalog 节点

specific to a certain module.


6. how to access to cinfiguration value

1.to get part of config:
$store->getConfig($path);

2.to get part of config:
Mage::getStoreConfig($path[,$store]);

3.to check store flag:
Mage::getStoreConfigFlag($path[,$store]);

4.to access by absolute path:
Mage::getConfig()->getNode($path[,$scope]);








Mage::getModel(URI); // 按URI寻找配置标签,然后实例化




内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: