1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Gacela\Framework\Bootstrap\Setup; |
||
6 | |||
7 | use Closure; |
||
8 | use Gacela\Framework\Config\GacelaConfigBuilder\AppConfigBuilder; |
||
9 | use Gacela\Framework\Config\GacelaConfigBuilder\BindingsBuilder; |
||
10 | use Gacela\Framework\Config\GacelaConfigBuilder\SuffixTypesBuilder; |
||
11 | |||
12 | final class GacelaConfigTransfer |
||
13 | { |
||
14 | /** |
||
15 | * @param ?array<string, class-string|object|callable> $externalServices |
||
1 ignored issue
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
16 | * @param ?list<string> $projectNamespaces |
||
17 | * @param ?array<string,mixed> $configKeyValues |
||
18 | * @param ?list<callable> $genericListeners |
||
19 | * @param ?array<class-string,list<callable>> $specificListeners |
||
20 | * @param ?list<class-string> $gacelaConfigsToExtend |
||
21 | * @param ?list<class-string|callable> $plugins |
||
22 | * @param ?array<string,list<Closure>> $servicesToExtend |
||
23 | */ |
||
24 | 93 | public function __construct( |
|
25 | private AppConfigBuilder $appConfigBuilder, |
||
26 | private SuffixTypesBuilder $suffixTypesBuilder, |
||
27 | private BindingsBuilder $bindingsBuilder, |
||
28 | private ?array $externalServices, |
||
29 | private ?bool $shouldResetInMemoryCache, |
||
30 | private ?bool $fileCacheEnabled, |
||
31 | private ?string $fileCacheDirectory, |
||
32 | private ?array $projectNamespaces, |
||
33 | private ?array $configKeyValues, |
||
34 | private ?array $genericListeners, |
||
35 | private ?array $specificListeners, |
||
36 | private ?bool $areEventListenersEnabled, |
||
37 | private ?array $gacelaConfigsToExtend, |
||
38 | private ?array $plugins, |
||
39 | private ?array $servicesToExtend, |
||
40 | ) { |
||
41 | 93 | } |
|
42 | |||
43 | 93 | public function getAppConfigBuilder(): AppConfigBuilder |
|
44 | { |
||
45 | 93 | return $this->appConfigBuilder; |
|
46 | } |
||
47 | |||
48 | 93 | public function getSuffixTypesBuilder(): SuffixTypesBuilder |
|
49 | { |
||
50 | 93 | return $this->suffixTypesBuilder; |
|
51 | } |
||
52 | |||
53 | 93 | public function getBindingsBuilder(): BindingsBuilder |
|
54 | { |
||
55 | 93 | return $this->bindingsBuilder; |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return ?array<string, class-string|object|callable> |
||
1 ignored issue
–
show
|
|||
60 | */ |
||
61 | 93 | public function getExternalServices(): ?array |
|
62 | { |
||
63 | 93 | return $this->externalServices; |
|
64 | } |
||
65 | |||
66 | 93 | public function getShouldResetInMemoryCache(): ?bool |
|
67 | { |
||
68 | 93 | return $this->shouldResetInMemoryCache; |
|
69 | } |
||
70 | |||
71 | 93 | public function getFileCacheEnabled(): ?bool |
|
72 | { |
||
73 | 93 | return $this->fileCacheEnabled; |
|
74 | } |
||
75 | |||
76 | 93 | public function getFileCacheDirectory(): ?string |
|
77 | { |
||
78 | 93 | return $this->fileCacheDirectory; |
|
79 | } |
||
80 | |||
81 | /** |
||
82 | * @return ?list<string> |
||
83 | */ |
||
84 | 93 | public function getProjectNamespaces(): ?array |
|
85 | { |
||
86 | 93 | return $this->projectNamespaces; |
|
87 | } |
||
88 | |||
89 | /** |
||
90 | * @return ?array<string,mixed> |
||
91 | */ |
||
92 | 93 | public function getConfigKeyValues(): ?array |
|
93 | { |
||
94 | 93 | return $this->configKeyValues; |
|
95 | } |
||
96 | |||
97 | 93 | public function getAreEventListenersEnabled(): ?bool |
|
98 | { |
||
99 | 93 | return $this->areEventListenersEnabled; |
|
100 | } |
||
101 | |||
102 | /** |
||
103 | * @return ?list<callable> |
||
104 | */ |
||
105 | 93 | public function getGenericListeners(): ?array |
|
106 | { |
||
107 | 93 | return $this->genericListeners; |
|
108 | } |
||
109 | |||
110 | /** |
||
111 | * @return ?array<class-string,list<callable>> |
||
112 | */ |
||
113 | 93 | public function getSpecificListeners(): ?array |
|
114 | { |
||
115 | 93 | return $this->specificListeners; |
|
116 | } |
||
117 | |||
118 | /** |
||
119 | * @return ?list<class-string> |
||
120 | */ |
||
121 | 93 | public function getGacelaConfigsToExtend(): ?array |
|
122 | { |
||
123 | 93 | return $this->gacelaConfigsToExtend; |
|
124 | } |
||
125 | |||
126 | /** |
||
127 | * @return ?list<class-string|callable> |
||
128 | */ |
||
129 | 93 | public function getPlugins(): ?array |
|
130 | { |
||
131 | 93 | return $this->plugins; |
|
132 | } |
||
133 | |||
134 | /** |
||
135 | * @return ?array<string,list<Closure>> |
||
136 | */ |
||
137 | 93 | public function getServicesToExtend(): ?array |
|
138 | { |
||
139 | 93 | return $this->servicesToExtend; |
|
140 | } |
||
141 | } |
||
142 |