1 | <?php |
||
19 | final class Configuration |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $name; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private $locales; |
||
30 | |||
31 | /** |
||
32 | * Usually dirname('kernel.root_dir'). |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | private $projectRoot; |
||
37 | |||
38 | /** |
||
39 | * This is where we dump all translations. |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | private $outputDir; |
||
44 | |||
45 | /** |
||
46 | * The absolute path to folders we scan for translations. |
||
47 | * |
||
48 | * @var array |
||
49 | */ |
||
50 | private $dirs; |
||
51 | |||
52 | /** |
||
53 | * Directories we should not extract translations from. |
||
54 | * |
||
55 | * @var array |
||
56 | */ |
||
57 | private $excludedDirs; |
||
58 | |||
59 | /** |
||
60 | * File names we should not extract translations from. |
||
61 | * |
||
62 | * @var array |
||
63 | */ |
||
64 | private $excludedNames; |
||
65 | |||
66 | /** |
||
67 | * Directories that holds translation files but is out of our control. |
||
68 | * |
||
69 | * @var array |
||
70 | */ |
||
71 | private $externalTranslationsDirs; |
||
72 | |||
73 | /** |
||
74 | * The format we store translation files in. |
||
75 | * |
||
76 | * @var string |
||
77 | */ |
||
78 | private $outputFormat; |
||
79 | |||
80 | /** |
||
81 | * @var array |
||
82 | */ |
||
83 | private $blacklistDomains; |
||
84 | |||
85 | /** |
||
86 | * @var array |
||
87 | */ |
||
88 | private $whitelistDomains; |
||
89 | |||
90 | /** |
||
91 | * @var string |
||
92 | */ |
||
93 | private $xliffVersion; |
||
94 | |||
95 | /** |
||
96 | * @param array $data |
||
97 | */ |
||
98 | 17 | public function __construct(array $data) |
|
113 | |||
114 | /** |
||
115 | * @return string |
||
116 | */ |
||
117 | 3 | public function getName() |
|
121 | |||
122 | /** |
||
123 | * @return array |
||
124 | */ |
||
125 | 3 | public function getLocales() |
|
129 | |||
130 | /** |
||
131 | * @return string |
||
132 | */ |
||
133 | 2 | public function getProjectRoot() |
|
137 | |||
138 | /** |
||
139 | * @return string |
||
140 | */ |
||
141 | 8 | public function getOutputDir() |
|
145 | |||
146 | /** |
||
147 | * @return array |
||
148 | */ |
||
149 | 2 | public function getDirs() |
|
153 | |||
154 | /** |
||
155 | * @return array |
||
156 | */ |
||
157 | 2 | public function getExcludedDirs() |
|
161 | |||
162 | /** |
||
163 | * @return array |
||
164 | */ |
||
165 | 2 | public function getExcludedNames() |
|
169 | |||
170 | /** |
||
171 | * @return array |
||
172 | */ |
||
173 | 1 | public function getExternalTranslationsDirs() |
|
177 | |||
178 | /** |
||
179 | * @return string |
||
180 | */ |
||
181 | 2 | public function getOutputFormat() |
|
185 | |||
186 | /** |
||
187 | * @return array |
||
188 | */ |
||
189 | 2 | public function getBlacklistDomains() |
|
193 | |||
194 | /** |
||
195 | * @return array |
||
196 | */ |
||
197 | 2 | public function getWhitelistDomains() |
|
201 | |||
202 | /** |
||
203 | * Get all paths where translation paths are stored. Both external files and |
||
204 | * files created by us. |
||
205 | * |
||
206 | * @return array |
||
207 | */ |
||
208 | 6 | public function getPathsToTranslationFiles() |
|
212 | |||
213 | /** |
||
214 | * @return string |
||
215 | */ |
||
216 | 2 | public function getXliffVersion() |
|
220 | |||
221 | /** |
||
222 | * Reconfigures the directories so we can use one configuration for extracting |
||
223 | * the messages only from one bundle. |
||
224 | * |
||
225 | * @param string $bundleDir |
||
226 | * @param string $outputDir |
||
227 | */ |
||
228 | public function reconfigureBundleDirs($bundleDir, $outputDir) |
||
233 | } |
||
234 |