/**
* Checks the list of parameters.
*
* @param array $params
*/
private static function _checkParams(array $params)
{
// check existance of mandatory parameters
// driver
if (!isset($params['driver']) && !isset($params['driverClass'])) {
throw DBALException::driverRequired();
}
// check validity of parameters
// driver
if (isset($params['driver']) && !isset(self::$_driverMap[$params['driver']])) {
throw DBALException::unknownDriver($params['driver'], array_keys(self::$_driverMap));
}
if (isset($params['driverClass']) && !in_array('Doctrine\\DBAL\\Driver', class_implements($params['driverClass'], true))) {
throw DBALException::invalidDriverClass($params['driverClass']);
}
}