mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 13:47:33 +02:00
DibiConnection: $config can be Traversable
This commit is contained in:
@@ -54,8 +54,8 @@ class DibiConnection extends DibiObject
|
||||
if (is_string($config)) {
|
||||
parse_str($config, $config);
|
||||
|
||||
} elseif ($config instanceof ArrayObject) {
|
||||
$config = (array) $config;
|
||||
} elseif ($config instanceof Traversable) {
|
||||
$config = iterator_to_array($config);
|
||||
|
||||
} elseif (!is_array($config)) {
|
||||
throw new InvalidArgumentException('Configuration must be array, string or ArrayObject.');
|
||||
|
Reference in New Issue
Block a user