18. Magento 细节

来源:互联网 发布:网络小额信贷 编辑:程序博客网 时间:2024/06/09 18:12

1. Magento 配置文件加载严格按字母顺序,除了模块依赖关系


2. global 节点

main database settings,such as host,database name ,user name,password and some system values.connections types(read/write)database adaptercore module class names

3. default 节点

directory structure real folder names.system localedesign and theme configurationsystem options

4. frontend 节点

routerstranslations fileslayout xml filesobservers 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寻找配置标签,然后实例化

这里写图片描述
这里写图片描述

0 0