1 | <?php |
||
30 | final class FlysystemXliffDumper extends XliffFileDumper |
||
31 | { |
||
32 | /** |
||
33 | * @var Filesystem |
||
34 | */ |
||
35 | private $filesystem; |
||
36 | |||
37 | /** |
||
38 | * A template for the relative paths to files. |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $relativePathTemplate = '%domain%.%locale%.%extension%'; |
||
43 | |||
44 | /** |
||
45 | * Make file backup before the dump. |
||
46 | * |
||
47 | * @var bool |
||
48 | */ |
||
49 | private $backup = true; |
||
|
|||
50 | |||
51 | /** |
||
52 | * @param Filesystem $filesystem |
||
53 | */ |
||
54 | 1 | public function setFilesystem($filesystem) |
|
58 | |||
59 | /** |
||
60 | * Sets the template for the relative paths to files. |
||
61 | * |
||
62 | * @param string $relativePathTemplate A template for the relative paths to files |
||
63 | */ |
||
64 | public function setRelativePathTemplate($relativePathTemplate) |
||
68 | |||
69 | /** |
||
70 | * Sets backup flag. |
||
71 | * |
||
72 | * @param bool |
||
73 | */ |
||
74 | public function setBackup($backup) |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | public function dump(MessageCatalogue $messages, $options = []) |
||
111 | |||
112 | /** |
||
113 | * Gets the relative file path using the template. |
||
114 | * |
||
115 | * @param string $domain The domain |
||
116 | * @param string $locale The locale |
||
117 | * |
||
118 | * @return string The relative file path |
||
119 | */ |
||
120 | private function getRelativePath($domain, $locale) |
||
128 | } |
||
129 |