1 | <?php |
||
15 | class Configuration implements ConfigurationInterface |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $beanNamespace; |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $daoNamespace; |
||
26 | /** |
||
27 | * @var Connection |
||
28 | */ |
||
29 | private $connection; |
||
30 | /** |
||
31 | * @var Cache |
||
32 | */ |
||
33 | private $cache; |
||
34 | /** |
||
35 | * @var SchemaAnalyzer |
||
36 | */ |
||
37 | private $schemaAnalyzer; |
||
38 | /** |
||
39 | * @var LoggerInterface |
||
40 | */ |
||
41 | private $logger; |
||
42 | /** |
||
43 | * @var GeneratorListenerInterface |
||
44 | */ |
||
45 | private $generatorEventDispatcher; |
||
46 | /** |
||
47 | * @var NamingStrategyInterface |
||
48 | */ |
||
49 | private $namingStrategy; |
||
50 | /** |
||
51 | * @var string|null |
||
52 | */ |
||
53 | private $customComposerFile; |
||
54 | |||
55 | /** |
||
56 | * @param string $beanNamespace The namespace hosting the beans |
||
57 | * @param string $daoNamespace The namespace hosting the DAOs |
||
58 | * @param Connection $connection The connection to the database |
||
59 | * @param Cache|null $cache The Doctrine cache to store database metadata |
||
60 | * @param SchemaAnalyzer|null $schemaAnalyzer The schema analyzer that will be used to find shortest paths... Will be automatically created if not passed |
||
61 | * @param LoggerInterface|null $logger The logger |
||
62 | * @param GeneratorListenerInterface[] $generatorListeners A list of listeners that will be triggered when beans/daos are generated |
||
63 | */ |
||
64 | public function __construct(string $beanNamespace, string $daoNamespace, Connection $connection, NamingStrategyInterface $namingStrategy, Cache $cache = null, SchemaAnalyzer $schemaAnalyzer = null, LoggerInterface $logger = null, array $generatorListeners = []) |
||
83 | |||
84 | /** |
||
85 | * @return string |
||
86 | */ |
||
87 | public function getBeanNamespace(): string |
||
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getDaoNamespace(): string |
||
99 | |||
100 | /** |
||
101 | * @return Connection |
||
102 | */ |
||
103 | public function getConnection(): Connection |
||
107 | |||
108 | /** |
||
109 | * @return NamingStrategyInterface |
||
110 | */ |
||
111 | public function getNamingStrategy(): NamingStrategyInterface |
||
115 | |||
116 | /** |
||
117 | * @return Cache |
||
118 | */ |
||
119 | public function getCache(): Cache |
||
123 | |||
124 | /** |
||
125 | * @return SchemaAnalyzer |
||
126 | */ |
||
127 | public function getSchemaAnalyzer(): SchemaAnalyzer |
||
131 | |||
132 | /** |
||
133 | * @return LoggerInterface |
||
134 | */ |
||
135 | public function getLogger(): ?LoggerInterface |
||
139 | |||
140 | /** |
||
141 | * @return GeneratorListenerInterface |
||
142 | */ |
||
143 | public function getGeneratorEventDispatcher(): GeneratorListenerInterface |
||
147 | |||
148 | |||
149 | |||
150 | /** |
||
151 | * Creates a unique cache key for the current connection. |
||
152 | * |
||
153 | * @return string |
||
154 | */ |
||
155 | private function getConnectionUniqueId(): string |
||
159 | |||
160 | /** |
||
161 | * @return null|string |
||
162 | */ |
||
163 | public function getCustomComposerFile() : ?string |
||
167 | |||
168 | /** |
||
169 | * @param null|string $customComposerFile |
||
170 | */ |
||
171 | public function setCustomComposerFile($customComposerFile) |
||
175 | } |
||
176 |