public static function assertDriverConfig($params, $driver, $fields, $name = null, $file = 'conf.php', $variable = '$conf')
{
global $registry;
// Don't generate a fatal error if we fail during or before
// Registry instantiation.
if (is_null($name)) {
$name = isset($registry) ? $registry->getApp() : '[unknown]';
}
$fileroot = isset($registry) ? $registry->get('fileroot') : '';
if (!is_array($params) || !count($params)) {
throw new Horde_Exception(sprintf(Horde_Core_Translation::t("No configuration information specified for %s."), $name) . "\n\n" . sprintf(Horde_Core_Translation::t("The file %s should contain some %s settings."), $fileroot . '/config/' . $file, sprintf("%s['%s']['params']", $variable, $driver)));
}
foreach ($fields as $field) {
if (!isset($params[$field])) {
throw new Horde_Exception(sprintf(Horde_Core_Translation::t("Required \"%s\" not specified in %s configuration."), $field, $name) . "\n\n" . sprintf(Horde_Core_Translation::t("The file %s should contain a %s setting."), $fileroot . '/config/' . $file, sprintf("%s['%s']['params']['%s']", $variable, $driver, $field)));
}
}
}