@@ 264-266 (lines=3) @@ | ||
261 | return $this; |
|
262 | } |
|
263 | ||
264 | if (!isset($config['type']) && !isset($config['service'])) { |
|
265 | throw new InvalidConfigurationException('Either the cache "type" or "service" must be set for "as3_modlr.metadata.cache"'); |
|
266 | } |
|
267 | if (isset($config['type']) && isset($config['service'])) { |
|
268 | throw new InvalidConfigurationException('You cannot set both the cache "type" and "service" for "as3_modlr.metadata.cache" - please choose one.'); |
|
269 | } |
|
@@ 290-292 (lines=3) @@ | ||
287 | { |
|
288 | foreach ($drivers as $name => $config) { |
|
289 | ||
290 | if (!isset($config['type']) && !isset($config['service'])) { |
|
291 | throw new InvalidConfigurationException(sprintf('Either the metadata driver "type" or "service" must be set for "as3_modlr.metadata.drivers.%s"', $name)); |
|
292 | } |
|
293 | if (isset($config['type']) && isset($config['service'])) { |
|
294 | throw new InvalidConfigurationException(sprintf('You cannot set both the metadata driver "type" and "service" for "as3_modlr.metadata.drivers.%s" - please choose one.', $name)); |
|
295 | } |
|
@@ 293-295 (lines=3) @@ | ||
290 | if (!isset($config['type']) && !isset($config['service'])) { |
|
291 | throw new InvalidConfigurationException(sprintf('Either the metadata driver "type" or "service" must be set for "as3_modlr.metadata.drivers.%s"', $name)); |
|
292 | } |
|
293 | if (isset($config['type']) && isset($config['service'])) { |
|
294 | throw new InvalidConfigurationException(sprintf('You cannot set both the metadata driver "type" and "service" for "as3_modlr.metadata.drivers.%s" - please choose one.', $name)); |
|
295 | } |
|
296 | } |
|
297 | return $this; |
|
298 | } |
|
@@ 310-312 (lines=3) @@ | ||
307 | private function validatePersisters(array $persisters) |
|
308 | { |
|
309 | foreach ($persisters as $name => $config) { |
|
310 | if (!isset($config['type']) && !isset($config['service'])) { |
|
311 | throw new InvalidConfigurationException(sprintf('Either the persister "type" or "service" must be set for "as3_modlr.persisters.%s"', $name)); |
|
312 | } |
|
313 | if (isset($config['type']) && isset($config['service'])) { |
|
314 | throw new InvalidConfigurationException(sprintf('You cannot set both the search client "type" and "service" for "as3_modlr.persisters.%s" - please choose one.', $name)); |
|
315 | } |
|
@@ 313-315 (lines=3) @@ | ||
310 | if (!isset($config['type']) && !isset($config['service'])) { |
|
311 | throw new InvalidConfigurationException(sprintf('Either the persister "type" or "service" must be set for "as3_modlr.persisters.%s"', $name)); |
|
312 | } |
|
313 | if (isset($config['type']) && isset($config['service'])) { |
|
314 | throw new InvalidConfigurationException(sprintf('You cannot set both the search client "type" and "service" for "as3_modlr.persisters.%s" - please choose one.', $name)); |
|
315 | } |
|
316 | ||
317 | if (isset($config['type'])) { |
|
318 | if ('mongodb' === $config['type']) { |
|
@@ 342-344 (lines=3) @@ | ||
339 | private function validateSearchClients(array $clients) |
|
340 | { |
|
341 | foreach ($clients as $name => $config) { |
|
342 | if (!isset($config['type']) && !isset($config['service'])) { |
|
343 | throw new InvalidConfigurationException(sprintf('Either the search client "type" or "service" must be set for "as3_modlr.search_clients.%s"', $name)); |
|
344 | } |
|
345 | if (isset($config['type']) && isset($config['service'])) { |
|
346 | throw new InvalidConfigurationException(sprintf('You cannot set both the search client "type" and "service" for "as3_modlr.search_clients.%s" - please choose one.', $name)); |
|
347 | } |
|
@@ 345-347 (lines=3) @@ | ||
342 | if (!isset($config['type']) && !isset($config['service'])) { |
|
343 | throw new InvalidConfigurationException(sprintf('Either the search client "type" or "service" must be set for "as3_modlr.search_clients.%s"', $name)); |
|
344 | } |
|
345 | if (isset($config['type']) && isset($config['service'])) { |
|
346 | throw new InvalidConfigurationException(sprintf('You cannot set both the search client "type" and "service" for "as3_modlr.search_clients.%s" - please choose one.', $name)); |
|
347 | } |
|
348 | ||
349 | if (isset($config['type'])) { |
|
350 | if ('elastic' === $config['type']) { |