src/DependencyInjection/Compiler/RegisterEntityFactoriesPass.php 1 location
|
@@ 17-28 (lines=12) @@
|
| 14 |
|
/** |
| 15 |
|
* {@inheritdoc} |
| 16 |
|
*/ |
| 17 |
|
public function process(ContainerBuilder $container) |
| 18 |
|
{ |
| 19 |
|
$definition = $container->getDefinition('innmind_neo4j.entity_factory.resolver'); |
| 20 |
|
$ids = $container->findTaggedServiceIds('innmind_neo4j.entity_factory'); |
| 21 |
|
|
| 22 |
|
foreach ($ids as $id => $tags) { |
| 23 |
|
$definition->addMethodCall( |
| 24 |
|
'register', |
| 25 |
|
[new Reference($id)] |
| 26 |
|
); |
| 27 |
|
} |
| 28 |
|
} |
| 29 |
|
} |
| 30 |
|
|
src/DependencyInjection/InnmindNeo4jExtension.php 1 location
|
@@ 143-157 (lines=15) @@
|
| 140 |
|
return $this; |
| 141 |
|
} |
| 142 |
|
|
| 143 |
|
private function configureGenerators( |
| 144 |
|
ContainerBuilder $container, |
| 145 |
|
array $generators |
| 146 |
|
): self { |
| 147 |
|
$definition = $container->getDefinition('innmind_neo4j.generators'); |
| 148 |
|
|
| 149 |
|
foreach ($generators as $class => $generator) { |
| 150 |
|
$definition->addMethodCall( |
| 151 |
|
'register', |
| 152 |
|
[$class, new Reference($generator)] |
| 153 |
|
); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
return $this; |
| 157 |
|
} |
| 158 |
|
} |
| 159 |
|
|