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 | * The Composer file used to detect the path where files should be written. |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | private $composerFile; |
||
56 | |||
57 | /** |
||
58 | * @param string $beanNamespace The namespace hosting the beans |
||
59 | * @param string $daoNamespace The namespace hosting the DAOs |
||
60 | * @param Connection $connection The connection to the database |
||
61 | * @param Cache|null $cache The Doctrine cache to store database metadata |
||
62 | * @param SchemaAnalyzer|null $schemaAnalyzer The schema analyzer that will be used to find shortest paths... Will be automatically created if not passed |
||
63 | * @param LoggerInterface|null $logger The logger |
||
64 | * @param GeneratorListenerInterface[] $generatorListeners A list of listeners that will be triggered when beans/daos are generated |
||
65 | */ |
||
66 | public function __construct(string $beanNamespace, string $daoNamespace, Connection $connection, NamingStrategyInterface $namingStrategy, Cache $cache = null, SchemaAnalyzer $schemaAnalyzer = null, LoggerInterface $logger = null, array $generatorListeners = []) |
||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getBeanNamespace(): string |
||
94 | |||
95 | /** |
||
96 | * @return string |
||
97 | */ |
||
98 | public function getDaoNamespace(): string |
||
102 | |||
103 | /** |
||
104 | * @return Connection |
||
105 | */ |
||
106 | public function getConnection(): Connection |
||
110 | |||
111 | /** |
||
112 | * @return NamingStrategyInterface |
||
113 | */ |
||
114 | public function getNamingStrategy(): NamingStrategyInterface |
||
118 | |||
119 | /** |
||
120 | * @return Cache |
||
121 | */ |
||
122 | public function getCache(): Cache |
||
126 | |||
127 | /** |
||
128 | * @return SchemaAnalyzer |
||
129 | */ |
||
130 | public function getSchemaAnalyzer(): SchemaAnalyzer |
||
134 | |||
135 | /** |
||
136 | * @return LoggerInterface |
||
137 | */ |
||
138 | public function getLogger(): ?LoggerInterface |
||
142 | |||
143 | /** |
||
144 | * @return GeneratorListenerInterface |
||
145 | */ |
||
146 | public function getGeneratorEventDispatcher(): GeneratorListenerInterface |
||
150 | |||
151 | |||
152 | |||
153 | /** |
||
154 | * Creates a unique cache key for the current connection. |
||
155 | * |
||
156 | * @return string |
||
157 | */ |
||
158 | private function getConnectionUniqueId(): string |
||
162 | |||
163 | /** |
||
164 | * @return null|string |
||
165 | */ |
||
166 | public function getComposerFile() : string |
||
170 | |||
171 | /** |
||
172 | * Sets the Composer file used to detect the path where files should be written. |
||
173 | * |
||
174 | * @param null|string $composerFile |
||
175 | */ |
||
176 | public function setComposerFile(string $composerFile) |
||
180 | } |
||
181 |