Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
DoctrineEntityDatalayerServiceProvider
n/a
0 / 0
n/a
0 / 0
3
n/a
0 / 0
 register
n/a
0 / 0
n/a
0 / 0
3
1<?php
2namespace Apie\DoctrineEntityDatalayer;
3
4use Apie\ServiceProviderGenerator\UseGeneratedMethods;
5use Illuminate\Support\ServiceProvider;
6
7/**
8 * This file is generated with apie/service-provider-generator from file: doctrine_entity_datalayer.yaml
9 * @codeCoverageIgnore
10 */
11class DoctrineEntityDatalayerServiceProvider extends ServiceProvider
12{
13    use UseGeneratedMethods;
14
15    public function register()
16    {
17        $this->app->singleton(
18            \Apie\DoctrineEntityDatalayer\EntityReindexer::class,
19            function ($app) {
20                return new \Apie\DoctrineEntityDatalayer\EntityReindexer(
21                    $app->make(\Apie\DoctrineEntityDatalayer\OrmBuilder::class),
22                    $app->make(\Apie\Core\Indexing\Indexer::class)
23                );
24            }
25        );
26        $this->app->singleton(
27            \Apie\DoctrineEntityDatalayer\Factories\DoctrineListFactory::class,
28            function ($app) {
29                return new \Apie\DoctrineEntityDatalayer\Factories\DoctrineListFactory(
30                    $app->make(\Apie\DoctrineEntityDatalayer\OrmBuilder::class),
31                    $app->make(\Apie\DoctrineEntityDatalayer\Factories\EntityQueryFilterFactory::class),
32                    $app->make(\Apie\StorageMetadata\DomainToStorageConverter::class)
33                );
34            }
35        );
36        $this->app->singleton(
37            \Apie\DoctrineEntityDatalayer\Factories\EntityQueryFilterFactory::class,
38            function ($app) {
39                return new \Apie\DoctrineEntityDatalayer\Factories\EntityQueryFilterFactory(
40                
41                );
42            }
43        );
44        $this->app->singleton(
45            \Apie\StorageMetadata\DomainToStorageConverter::class,
46            function ($app) {
47                return \Apie\StorageMetadata\DomainToStorageConverter::create(
48                    $app->make(\Apie\Core\FileStorage\ChainedFileStorage::class),
49                    $app->make(\Apie\Core\Indexing\Indexer::class)
50                );
51                
52            }
53        );
54        $this->app->singleton(
55            \Apie\DoctrineEntityDatalayer\IndexStrategy\DirectIndexStrategy::class,
56            function ($app) {
57                return new \Apie\DoctrineEntityDatalayer\IndexStrategy\DirectIndexStrategy(
58                    $app->make(\Apie\DoctrineEntityDatalayer\EntityReindexer::class)
59                );
60            }
61        );
62        $this->app->singleton(
63            \Apie\DoctrineEntityDatalayer\IndexStrategy\IndexAfterResponseIsSentStrategy::class,
64            function ($app) {
65                return new \Apie\DoctrineEntityDatalayer\IndexStrategy\IndexAfterResponseIsSentStrategy(
66                    $app->make(\Apie\DoctrineEntityDatalayer\EntityReindexer::class)
67                );
68            }
69        );
70        \Apie\ServiceProviderGenerator\TagMap::register(
71            $this->app,
72            \Apie\DoctrineEntityDatalayer\IndexStrategy\IndexAfterResponseIsSentStrategy::class,
73            array(
74              0 => 'kernel.event_subscriber',
75            )
76        );
77        $this->app->tag([\Apie\DoctrineEntityDatalayer\IndexStrategy\IndexAfterResponseIsSentStrategy::class], 'kernel.event_subscriber');
78        $this->app->singleton(
79            \Apie\DoctrineEntityDatalayer\DoctrineEntityDatalayer::class,
80            function ($app) {
81                return new \Apie\DoctrineEntityDatalayer\DoctrineEntityDatalayer(
82                    $app->make(\Apie\DoctrineEntityDatalayer\OrmBuilder::class),
83                    $app->make(\Apie\StorageMetadata\DomainToStorageConverter::class),
84                    $app->make(\Apie\DoctrineEntityDatalayer\IndexStrategy\IndexStrategyInterface::class),
85                    $app->make(\Apie\DoctrineEntityDatalayer\Factories\DoctrineListFactory::class)
86                );
87            }
88        );
89        \Apie\ServiceProviderGenerator\TagMap::register(
90            $this->app,
91            \Apie\DoctrineEntityDatalayer\DoctrineEntityDatalayer::class,
92            array(
93              0 => 'apie.datalayer',
94            )
95        );
96        $this->app->tag([\Apie\DoctrineEntityDatalayer\DoctrineEntityDatalayer::class], 'apie.datalayer');
97        $this->app->singleton(
98            \Apie\DoctrineEntityDatalayer\OrmBuilder::class,
99            function ($app) {
100                return new \Apie\DoctrineEntityDatalayer\OrmBuilder(
101                    $app->make(\Apie\DoctrineEntityConverter\OrmBuilder::class),
102                    $this->parseArgument('%apie.doctrine.build_once%'),
103                    $this->parseArgument('%apie.doctrine.run_migrations%'),
104                    $this->parseArgument('%kernel.debug%'),
105                    $this->parseArgument('%kernel.cache_dir%/apie_proxies'),
106                    $app->bound(\Psr\Cache\CacheItemPoolInterface::class) ? $app->make(\Psr\Cache\CacheItemPoolInterface::class) : null,
107                    $this->parseArgument('%kernel.cache_dir%/apie_entities'),
108                    $this->parseArgument('%apie.doctrine.connection_params%'),
109                    $app->bound('doctrine.dbal.debug_middleware.default') ? $app->make('doctrine.dbal.debug_middleware.default') : null
110                );
111            }
112        );
113        
114    }
115}