Respuestas:
config.xml y local.xml se cargan juntos, junto con cualquier otro archivo xml que coloque app/local
. Están cargados enMage_Core_Model_Config::loadBase()
public function loadBase()
{
$etcDir = $this->getOptions()->getEtcDir();
$files = glob($etcDir.DS.'*.xml');
$this->loadFile(current($files));
while ($file = next($files)) {
$merge = clone $this->_prototype;
$merge->loadFile($file);
$this->extend($merge);
}
if (in_array($etcDir.DS.'local.xml', $files)) {
$this->_isLocalConfigLoaded = true;
}
return $this;
}
Magento will work if you move the contents of config.xml to local.xml and remove entirely config.xml.
This separation exists for a reason.
config.xml contains (let's call them) settings that do not depend on the environment where Magento is installed.
local.xml contains environment dependent settings: DB connection, cache engine, encryption key, session handler.
This way a part of the settings can be versioned (config.xml) and you only have a small file depending on the environment.
core_config_data
are parsed and merged in after local.xml.