case 'Sql':
$params['db'] = $this->_injector->getInstance('Horde_Db_Adapter');
- // @todo All DB's use UTF-8(?) Does not seem to be a way to
- // get this information from Horde_Db_Adapter.
- $opts['charset'] = 'UTF-8';
+ $opts['charset'] = $params['db']->getOption('charset');
break;
}
$this->connect();
}
+ /**
+ * Returns an adaptor option set through the constructor.
+ *
+ * @param string $option The option to return.
+ *
+ * @return mixed The option value or null if option doesn't exist or is
+ * not set.
+ */
+ public function getOption($option)
+ {
+ return isset($this->_config[$option]) ? $this->_config[$option] : null;
+ }
/*##########################################################################
# Dependency setters/getters