Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
CoreServiceProvider | n/a |
0 / 0 |
n/a |
0 / 0 |
2 | n/a |
0 / 0 |
|||
register | n/a |
0 / 0 |
n/a |
0 / 0 |
2 |
1 | <?php |
2 | namespace Apie\Core; |
3 | |
4 | use Apie\ServiceProviderGenerator\UseGeneratedMethods; |
5 | use Illuminate\Support\ServiceProvider; |
6 | |
7 | /** |
8 | * This file is generated with apie/service-provider-generator from file: core.yaml |
9 | * @codeCoverageIgnore |
10 | */ |
11 | class CoreServiceProvider extends ServiceProvider |
12 | { |
13 | use UseGeneratedMethods; |
14 | |
15 | public function register() |
16 | { |
17 | $this->app->bind('apie.csrf_token_provider', \Apie\Core\Session\CsrfTokenProvider::class); |
18 | |
19 | $this->app->singleton( |
20 | \Apie\Core\BoundedContext\BoundedContextHashmap::class, |
21 | function ($app) { |
22 | return $this->app->make('apie.bounded_context.hashmap_factory')->create( |
23 | |
24 | ); |
25 | |
26 | } |
27 | ); |
28 | $this->app->singleton( |
29 | \Apie\Core\Translator\ApieTranslatorInterface::class, |
30 | function ($app) { |
31 | return \Apie\Core\Translator\ApieTranslator::create( |
32 | |
33 | ); |
34 | |
35 | } |
36 | ); |
37 | \Apie\ServiceProviderGenerator\TagMap::register( |
38 | $this->app, |
39 | \Apie\Core\Translator\ApieTranslatorInterface::class, |
40 | array( |
41 | 0 => 'apie.context', |
42 | ) |
43 | ); |
44 | $this->app->tag([\Apie\Core\Translator\ApieTranslatorInterface::class], 'apie.context'); |
45 | $this->app->singleton( |
46 | \Apie\Core\ContextBuilders\ContextBuilderFactory::class, |
47 | function ($app) { |
48 | return \Apie\Common\Wrappers\GeneralServiceFactory::createContextBuilderFactory( |
49 | $app->make(\Apie\Core\BoundedContext\BoundedContextHashmap::class), |
50 | $app->bound(\Apie\Serializer\DecoderHashmap::class) ? $app->make(\Apie\Serializer\DecoderHashmap::class) : null, |
51 | $this->getTaggedServicesIterator('apie.core.context_builder') |
52 | ); |
53 | |
54 | } |
55 | ); |
56 | $this->app->bind('apie.bounded_context.hashmap', \Apie\Core\BoundedContext\BoundedContextHashmap::class); |
57 | |
58 | $this->app->bind('apie.context.factory', \Apie\Core\ContextBuilders\ContextBuilderFactory::class); |
59 | |
60 | $this->app->bind(\Apie\Core\Datalayers\ApieDatalayer::class, \Apie\Core\Datalayers\GroupedDataLayer::class); |
61 | |
62 | $this->app->singleton( |
63 | \Apie\Core\Datalayers\GroupedDataLayer::class, |
64 | function ($app) { |
65 | return new \Apie\Core\Datalayers\GroupedDataLayer( |
66 | $app->make(\Apie\Core\Datalayers\Grouped\DataLayerByBoundedContext::class) |
67 | ); |
68 | } |
69 | ); |
70 | \Apie\ServiceProviderGenerator\TagMap::register( |
71 | $this->app, |
72 | \Apie\Core\Datalayers\GroupedDataLayer::class, |
73 | array( |
74 | 0 => 'apie.context', |
75 | ) |
76 | ); |
77 | $this->app->tag([\Apie\Core\Datalayers\GroupedDataLayer::class], 'apie.context'); |
78 | $this->app->bind('apie.datalayer', \Apie\Core\Datalayers\ApieDatalayer::class); |
79 | |
80 | $this->app->singleton( |
81 | \Apie\Core\Indexing\Indexer::class, |
82 | function ($app) { |
83 | return \Apie\Core\Indexing\Indexer::create( |
84 | |
85 | ); |
86 | |
87 | } |
88 | ); |
89 | $this->app->singleton( |
90 | \Apie\Core\Datalayers\Search\LazyLoadedListFilterer::class, |
91 | function ($app) { |
92 | return new \Apie\Core\Datalayers\Search\LazyLoadedListFilterer( |
93 | $app->make(\Apie\Core\Indexing\Indexer::class) |
94 | ); |
95 | } |
96 | ); |
97 | $this->app->singleton( |
98 | \Apie\Core\Other\FileWriterInterface::class, |
99 | function ($app) { |
100 | return new \Apie\Core\Other\ActualFileWriter( |
101 | |
102 | ); |
103 | } |
104 | ); |
105 | $this->app->singleton( |
106 | \Apie\Core\FileStorage\ChainedFileStorage::class, |
107 | function ($app) { |
108 | return \Apie\Core\FileStorage\FileStorageFactory::create( |
109 | $this->parseArgument('%apie.storage%') |
110 | ); |
111 | |
112 | } |
113 | ); |
114 | \Apie\ServiceProviderGenerator\TagMap::register( |
115 | $this->app, |
116 | \Apie\Core\FileStorage\ChainedFileStorage::class, |
117 | array( |
118 | 0 => 'apie.context', |
119 | ) |
120 | ); |
121 | $this->app->tag([\Apie\Core\FileStorage\ChainedFileStorage::class], 'apie.context'); |
122 | $this->app->singleton( |
123 | \Apie\Core\Datalayers\Grouped\DataLayerByBoundedContext::class, |
124 | function ($app) { |
125 | return \Apie\Common\Wrappers\GeneralServiceFactory::createDataLayerMap( |
126 | $this->parseArgument('%apie.datalayers%'), |
127 | $this->getTaggedServicesServiceLocator('apie.datalayer') |
128 | ); |
129 | |
130 | } |
131 | ); |
132 | |
133 | } |
134 | } |