| @@ 46-61 (lines=16) @@ | ||
| 43 | /** |
|
| 44 | * {@inheritdoc} |
|
| 45 | */ |
|
| 46 | public function configure($config) |
|
| 47 | { |
|
| 48 | if (!is_array($config) && !($config instanceof Traversable)) { |
|
| 49 | throw new InvalidConfigException( |
|
| 50 | 'You can only load definitions from an array or an object that implements Traversable interface.' |
|
| 51 | ); |
|
| 52 | } |
|
| 53 | foreach ($config as $alias => $concrete) { |
|
| 54 | ||
| 55 | if (!is_string($concrete)) { |
|
| 56 | continue; |
|
| 57 | } |
|
| 58 | ||
| 59 | $this->configureOne($alias, $concrete); |
|
| 60 | } |
|
| 61 | } |
|
| 62 | /** |
|
| 63 | * {@inheritdoc} |
|
| 64 | */ |
|
| @@ 46-57 (lines=12) @@ | ||
| 43 | /** |
|
| 44 | * {@inheritdoc} |
|
| 45 | */ |
|
| 46 | public function configure($config) |
|
| 47 | { |
|
| 48 | if (!is_array($config) && !($config instanceof Traversable)) { |
|
| 49 | throw new InvalidConfigException( |
|
| 50 | 'You can only load definitions from an array or an object that implements Traversable interface.' |
|
| 51 | ); |
|
| 52 | } |
|
| 53 | ||
| 54 | foreach ($config as $alias => $options) { |
|
| 55 | $this->configureOne($alias, $options); |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| 59 | /** |
|
| 60 | * {@inheritdoc} |
|