parent
49cf62a9dc
commit
0c69dbf482
|
@ -211,12 +211,12 @@ class DbAdapterFactory implements ConfigAwareFactory
|
||||||
throw new ConfigurationError($msg);
|
throw new ConfigurationError($msg);
|
||||||
}
|
}
|
||||||
$options = array(
|
$options = array(
|
||||||
'dbname' => $config->dbname,
|
'dbname' => $config->dbname,
|
||||||
'host' => $config->host,
|
'host' => $config->host,
|
||||||
'username' => $config->username,
|
'username' => $config->username,
|
||||||
'password' => $config->password,
|
'password' => $config->password,
|
||||||
'options' => self::$defaultZendDbAdapterOptions,
|
'options' => self::$defaultZendDbAdapterOptions,
|
||||||
'driver_options' => self::$defaultPdoDriverOptions
|
'driver_options' => self::$defaultPdoDriverOptions
|
||||||
);
|
);
|
||||||
switch ($config->db) {
|
switch ($config->db) {
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
|
@ -246,7 +246,7 @@ class DbAdapterFactory implements ConfigAwareFactory
|
||||||
private static function callFactory($adapter, $options)
|
private static function callFactory($adapter, $options)
|
||||||
{
|
{
|
||||||
$factory = self::$factoryClass;
|
$factory = self::$factoryClass;
|
||||||
$optionModifierCallback = __CLASS__. '::get' . ucfirst(str_replace('_', '', $adapter)) . 'Options';
|
$optionModifierCallback = __CLASS__ . '::get' . ucfirst(str_replace('_', '', $adapter)) . 'Options';
|
||||||
if (is_callable($optionModifierCallback)) {
|
if (is_callable($optionModifierCallback)) {
|
||||||
$options = call_user_func($optionModifierCallback, $options);
|
$options = call_user_func($optionModifierCallback, $options);
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ class Manager
|
||||||
{
|
{
|
||||||
$type = ucwords(strtolower($backendConfig->backend));
|
$type = ucwords(strtolower($backendConfig->backend));
|
||||||
if (!$type) {
|
if (!$type) {
|
||||||
Logger::warn('No type given...');
|
Logger::warn('Backend has no type configured. (e.g. backend=ldap)');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -209,12 +209,13 @@ class Manager
|
||||||
/**
|
/**
|
||||||
* Try to authenticate the current user with the Credentials (@see Credentials).
|
* Try to authenticate the current user with the Credentials (@see Credentials).
|
||||||
*
|
*
|
||||||
* @param Credentials $credentials The credentials to use for authentication
|
* @param Credentials $credentials The credentials to use for authentication
|
||||||
* @param Boolean $persist Whether to persist the authentication result
|
* @param Boolean $persist Whether to persist the authentication result
|
||||||
* in the current session
|
* in the current session
|
||||||
*
|
*
|
||||||
* @return Boolean true on success, otherwise false
|
* @return Boolean true on success, otherwise false
|
||||||
**/
|
* @throws ConfigError
|
||||||
|
*/
|
||||||
public function authenticate(Credentials $credentials, $persist = true)
|
public function authenticate(Credentials $credentials, $persist = true)
|
||||||
{
|
{
|
||||||
if (!$this->userBackend) {
|
if (!$this->userBackend) {
|
||||||
|
|
|
@ -93,7 +93,6 @@ class DbStore implements LoadInterface, FlushObserverInterface
|
||||||
public function setDbAdapter(Zend_Db_Adapter_Abstract $db)
|
public function setDbAdapter(Zend_Db_Adapter_Abstract $db)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->db->getProfiler()->setEnabled(true);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue