Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
33 | public function process(ContainerBuilder $container) |
||
34 | { |
||
35 | $config = $container->getParameter('bengor_file.config'); |
||
36 | foreach ($config['file_class'] as $key => $file) { |
||
37 | $container->setDefinition( |
||
38 | 'bengor.file.infrastructure.domain.model.' . $key . '_factory', |
||
39 | (new Definition( |
||
40 | FileFactory::class, [ |
||
41 | $file['class'], |
||
42 | ] |
||
43 | ))->setPublic(false) |
||
44 | ); |
||
45 | $container->setAlias( |
||
46 | 'bengor_file.' . $key . '.factory', |
||
47 | 'bengor.file.infrastructure.domain.model.' . $key . '_factory' |
||
48 | ); |
||
49 | } |
||
50 | } |
||
51 | } |
||
52 |