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 | $app->make(\Psr\EventDispatcher\EventDispatcherInterface::class) |
68 | ); |
69 | } |
70 | ); |
71 | \Apie\ServiceProviderGenerator\TagMap::register( |
72 | $this->app, |
73 | \Apie\Core\Datalayers\GroupedDataLayer::class, |
74 | array( |
75 | 0 => 'apie.context', |
76 | ) |
77 | ); |
78 | $this->app->tag([\Apie\Core\Datalayers\GroupedDataLayer::class], 'apie.context'); |
79 | $this->app->bind('apie.datalayer', \Apie\Core\Datalayers\ApieDatalayer::class); |
80 | |
81 | $this->app->singleton( |
82 | \Apie\Core\Indexing\Indexer::class, |
83 | function ($app) { |
84 | return \Apie\Core\Indexing\Indexer::create( |
85 | |
86 | ); |
87 | |
88 | } |
89 | ); |
90 | $this->app->singleton( |
91 | \Apie\Core\Datalayers\Search\LazyLoadedListFilterer::class, |
92 | function ($app) { |
93 | return new \Apie\Core\Datalayers\Search\LazyLoadedListFilterer( |
94 | $app->make(\Apie\Core\Indexing\Indexer::class) |
95 | ); |
96 | } |
97 | ); |
98 | $this->app->singleton( |
99 | \Apie\Core\Other\FileWriterInterface::class, |
100 | function ($app) { |
101 | return new \Apie\Core\Other\ActualFileWriter( |
102 | |
103 | ); |
104 | } |
105 | ); |
106 | $this->app->singleton( |
107 | \Apie\Core\FileStorage\ChainedFileStorage::class, |
108 | function ($app) { |
109 | return \Apie\Core\FileStorage\FileStorageFactory::create( |
110 | $this->parseArgument('%apie.storage%') |
111 | ); |
112 | |
113 | } |
114 | ); |
115 | \Apie\ServiceProviderGenerator\TagMap::register( |
116 | $this->app, |
117 | \Apie\Core\FileStorage\ChainedFileStorage::class, |
118 | array( |
119 | 0 => 'apie.context', |
120 | ) |
121 | ); |
122 | $this->app->tag([\Apie\Core\FileStorage\ChainedFileStorage::class], 'apie.context'); |
123 | $this->app->singleton( |
124 | \Apie\Core\Datalayers\Grouped\DataLayerByBoundedContext::class, |
125 | function ($app) { |
126 | return \Apie\Common\Wrappers\GeneralServiceFactory::createDataLayerMap( |
127 | $this->parseArgument('%apie.datalayers%'), |
128 | $this->getTaggedServicesServiceLocator('apie.datalayer') |
129 | ); |
130 | |
131 | } |
132 | ); |
133 | |
134 | } |
135 | } |