Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) |
||
21 | { |
||
22 | $options = $this->getOptions($container, 'entitymanager'); |
||
23 | assert($options instanceof DoctrineORMModuleEntityManager); |
||
24 | $connection = $container->get($options->getConnection()); |
||
25 | $config = $container->get($options->getConfiguration()); |
||
26 | |||
27 | // initializing the resolver |
||
28 | // @todo should actually attach it to a fetched event manager here, and not |
||
29 | // rely on its factory code |
||
30 | $container->get($options->getEntityResolver()); |
||
31 | |||
32 | return EntityManager::create($connection, $config); |
||
33 | } |
||
34 | |||
50 |