|
@@ 310-322 (lines=13) @@
|
| 307 |
|
$formatDiscoverLocalFileStorageFactoryDef |
| 308 |
|
)); |
| 309 |
|
break; |
| 310 |
|
case 'doctrine': |
| 311 |
|
$listResolverDef = new Definition(StringOrFileList::class, array($config['queries'])); |
| 312 |
|
if (!isset($config['connection_factory'])) { |
| 313 |
|
$connectionFactoryDef = new Definition(DefaultConnectionFactory::class, array(array('default'=>new Reference('doctrine.orm.entity_manager')))); |
| 314 |
|
} else { |
| 315 |
|
$connectionFactoryDef = new Reference($config['connection_factory']); |
| 316 |
|
} |
| 317 |
|
|
| 318 |
|
$spDef = new Definition('Mathielen\ImportEngine\Storage\Provider\DoctrineQueryStorageProvider', array( |
| 319 |
|
$connectionFactoryDef, |
| 320 |
|
$listResolverDef |
| 321 |
|
)); |
| 322 |
|
break; |
| 323 |
|
case 'service': |
| 324 |
|
$spDef = new Definition('Mathielen\ImportEngine\Storage\Provider\ServiceStorageProvider', array( |
| 325 |
|
new Reference('service_container'), |
|
@@ 334-346 (lines=13) @@
|
| 331 |
|
$formatDiscoverLocalFileStorageFactoryDef |
| 332 |
|
)); |
| 333 |
|
break; |
| 334 |
|
case 'dbal': |
| 335 |
|
$listResolverDef = new Definition(StringOrFileList::class, array($config['queries'])); |
| 336 |
|
if (!isset($config['connection_factory'])) { |
| 337 |
|
$connectionFactoryDef = new Definition(DefaultConnectionFactory::class, array(array('default'=>new Reference('doctrine.dbal.default_connection')))); |
| 338 |
|
} else { |
| 339 |
|
$connectionFactoryDef = new Reference($config['connection_factory']); |
| 340 |
|
} |
| 341 |
|
|
| 342 |
|
$spDef = new Definition('Mathielen\ImportEngine\Storage\Provider\DbalStorageProvider', array( |
| 343 |
|
$connectionFactoryDef, |
| 344 |
|
$listResolverDef |
| 345 |
|
)); |
| 346 |
|
break; |
| 347 |
|
default: |
| 348 |
|
throw new InvalidConfigurationException('Unknown type for storage provider: '.$config['type']); |
| 349 |
|
} |