1 | <?php |
||
23 | final class TranslationLoader implements \Translation\SymfonyStorage\TranslationLoader |
||
24 | { |
||
25 | /** |
||
26 | * Loaders used for import. |
||
27 | * |
||
28 | * @var LoaderInterface[] |
||
29 | */ |
||
30 | private $loaders = []; |
||
31 | |||
32 | /** |
||
33 | * @var Filesystem |
||
34 | */ |
||
35 | private $filesystem; |
||
36 | |||
37 | /** |
||
38 | * @param Filesystem $filesystem |
||
39 | */ |
||
40 | 1 | public function __construct(Filesystem $filesystem) |
|
44 | |||
45 | /** |
||
46 | * Adds a loader to the translation extractor. |
||
47 | * |
||
48 | * @param string $format The format of the loader |
||
49 | * @param LoaderInterface $loader |
||
50 | */ |
||
51 | 1 | public function addLoader($format, LoaderInterface $loader) |
|
55 | |||
56 | /** |
||
57 | * Loads translation messages from a directory to the catalogue. |
||
58 | * |
||
59 | * @param string $directory the directory to look into |
||
60 | * @param MessageCatalogue $catalogue the catalogue |
||
61 | */ |
||
62 | public function loadMessages($directory, MessageCatalogue $catalogue) |
||
80 | |||
81 | /** |
||
82 | * Gets the filename from a given path. |
||
83 | * |
||
84 | * PHP's basename() does not properly support streams or filenames beginning with a non-US-ASCII character. |
||
85 | * |
||
86 | * @author Drupal 8.2 |
||
87 | * |
||
88 | * @param string $path |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | private function basename($path) |
||
108 | } |
||
109 |