Redesign how Predis\ConnectionFactory works and make more sense out of it.

This commit is contained in:
Daniele Alessandri
2011-11-29 12:01:28 +01:00
parent 058e11257b
commit 728afe7fcb
6 changed files with 130 additions and 109 deletions
@@ -30,7 +30,11 @@ class ClientConnectionFactory extends Option
return $value;
}
if (is_array($value)) {
return new ConnectionFactory($value);
$factory = $this->getDefault();
foreach ($value as $scheme => $initializer) {
$factory->define($scheme, $initializer);
}
return $factory;
}
}