core_config
  使用方式
  $admin_menu = (array)AWS_APP::config()->get('admin_menu');
  实现
  get的调用会从内存中查找,如果找不到终会调用load_config
  system/core/config.php#get
function get($config_id)
{
...
if (isset($this->config[$config_id]))
{
return $this->config[$config_id];
}
else
{
return $this->load_config($config_id);
}
}
  load_config会从config目录加载指定Id为文件名的配置文件,并缓冲到内存中
  system/core/config.php#load_config
function load_config($config_id)
{
if (substr($config_id, -10) == '.extension' OR !file_exists(AWS_PATH . 'config/' . $config_id . '.php'))
{
throw new Zend_Exception('The configuration file config/' . $config_id . '.php does not exist.');
}
include_once(AWS_PATH . 'config/' . $config_id . '.php');
if (!is_array($config))
{
throw new Zend_Exception('Your config/' . $config_id . '.php file does not appear to contain a valid configuration array.');
}
$this->config[$config_id] = (object)$config;
return $this->config[$config_id];
}
  另外,core_config还提供了一个动态写配置到文件的功能
  system/core/config.php#set
public function set($config_id, $data)
{
if (!$data || ! is_array($data))
{
throw new Zend_Exception('config data type error');
}
$content = "<?php ";
foreach($data as $key => $val)
{
if (is_array($val))
{
$content .= "$config['{$key}'] = " . var_export($val, true) . ";";;
}
else if (is_bool($val))
{
$content .= "$config['{$key}'] = " . ($val ? 'true' : 'false') . ";";
}
else
{
$content .= "$config['{$key}'] = '" . addcslashes($val, "'") . "';";
}
$content .= " ";
}
$config_path = AWS_PATH . 'config/' . $config_id . '.php';
$fp = @fopen($config_path, "w");
@chmod($config_path, 0777);
$fwlen = @fwrite($fp, $content);
@fclose($fp);
return $fwlen;
}