public function read($file)
{
if (!file_exists($file)) {
throw new Phergie_Config_Exception('File "' . $file . '" does not exist', Phergie_Config_Exception::ERR_FILE_NOT_FOUND);
}
if (!is_readable($file)) {
throw new Phergie_Config_Exception('File "' . $file . '" cannot be read', Phergie_Config_Exception::ERR_FILE_NOT_READABLE);
}
$settings = (include $file);
if (!is_array($settings)) {
throw new Phergie_Config_Exception('File "' . $file . '" does not return an array', Phergie_Config_Exception::ERR_ARRAY_NOT_RETURNED);
}
$this->files[$file] = array_keys($settings);
$this->settings += $settings;
return $this;
}