public function load($file)
{
if (!is_readable($file)) {
throw new ConfigurationException(sprintf("Cannot read configuration file: %s", $file));
}
try {
$config = Yaml::parse(file_get_contents($file));
} catch (ParseException $e) {
throw new ConfigurationException('Error in configuration file: %s', $e->getMessage());
}
return $this->loadFromArray($config);
}