1 | <?php |
||
23 | class ExportManager |
||
24 | { |
||
25 | /** |
||
26 | * @var TranslationManager |
||
27 | */ |
||
28 | private $translationManager; |
||
29 | |||
30 | /** |
||
31 | * @var YmlExport |
||
32 | */ |
||
33 | private $exporter; |
||
34 | |||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | private $locales; |
||
39 | |||
40 | /** |
||
41 | * @var Translation[] |
||
42 | */ |
||
43 | private $refresh = []; |
||
44 | |||
45 | /** |
||
46 | * @param ParameterBag $loadersContainer |
||
47 | * @param TranslationManager $translationManager |
||
48 | * @param YmlExport $exporter |
||
49 | */ |
||
50 | public function __construct( |
||
59 | |||
60 | /** |
||
61 | * @return array |
||
62 | */ |
||
63 | public function getLocales() |
||
67 | |||
68 | /** |
||
69 | * @param array $locales |
||
70 | */ |
||
71 | public function setLocales($locales) |
||
75 | |||
76 | /** |
||
77 | * Exports translations from ES to files. |
||
78 | * |
||
79 | * @param array $domains To export. |
||
80 | * @param bool $force |
||
81 | */ |
||
82 | public function export($domains = [], $force = null) |
||
100 | |||
101 | /** |
||
102 | * Get translations for export. |
||
103 | * |
||
104 | * @param array $domains To read from storage. |
||
105 | * @param bool $force Determines if the message status is relevant. |
||
106 | * |
||
107 | * @return array |
||
108 | */ |
||
109 | private function formExportList($domains, $force) |
||
142 | } |
||
143 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: