1 | <?php |
||
15 | class YamlL10nLoader extends FileLoader |
||
16 | { |
||
17 | const ROOT = 'l10n'; |
||
18 | |||
19 | /** @var array */ |
||
20 | private $config; |
||
21 | |||
22 | 5 | public function __construct(FileLocatorInterface $locator) |
|
27 | |||
28 | /** |
||
29 | * Loads a Yaml file. |
||
30 | * |
||
31 | * @param mixed $file The resource |
||
32 | * @param string $type The resource type |
||
33 | * |
||
34 | * @throws FileLoaderLoadException |
||
35 | */ |
||
36 | 3 | public function load($file, $type = null) |
|
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | 1 | public function supports($resource, $type = null) |
|
61 | |||
62 | /** |
||
63 | * @return array |
||
64 | */ |
||
65 | 4 | public function getConfig() |
|
69 | |||
70 | /** |
||
71 | * Loads a YAML file. |
||
72 | * |
||
73 | * @param string $file |
||
74 | * |
||
75 | * @throws FileLoaderLoadException |
||
76 | * |
||
77 | * @return array The file content |
||
78 | */ |
||
79 | public function loadFile($file) |
||
87 | |||
88 | /** |
||
89 | * Parses all imports |
||
90 | * |
||
91 | * @param array $content |
||
92 | * @param string $file |
||
93 | * |
||
94 | * @return void |
||
95 | */ |
||
96 | 3 | private function parseImports($content, $file) |
|
107 | |||
108 | /** |
||
109 | * Recursively merges the config of content into current config. |
||
110 | * |
||
111 | * @param $content |
||
112 | */ |
||
113 | 3 | private function loadConfig($content) |
|
119 | } |
||
120 |