1 | <?php |
||
7 | class BundleMap |
||
8 | { |
||
9 | /** |
||
10 | * Array containing mapped lang bundles. |
||
11 | * |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $bundleMap = []; |
||
15 | |||
16 | /** |
||
17 | * Array of auto-aliased file names. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $autoAliases = []; |
||
22 | |||
23 | /** |
||
24 | * Return bundle map. |
||
25 | * |
||
26 | * @return array |
||
27 | */ |
||
28 | public function getBundleMap() |
||
32 | |||
33 | /** |
||
34 | * Get auto-alias array. |
||
35 | * |
||
36 | * @return array |
||
37 | */ |
||
38 | public function getAutoAliases() |
||
42 | |||
43 | /** |
||
44 | * Return true if bundleMap is empty. |
||
45 | * |
||
46 | * @return bool |
||
47 | */ |
||
48 | public function bundleMapIsEmpty() |
||
52 | |||
53 | /** |
||
54 | * Get trans values for path keys. |
||
55 | * |
||
56 | * @param array $pathKeys |
||
57 | * |
||
58 | * @return Collection |
||
59 | */ |
||
60 | public function getBundleValues(array $pathKeys) |
||
72 | |||
73 | /** |
||
74 | * Get all the lang bundle files from the bundles directory. |
||
75 | * |
||
76 | * @return array |
||
77 | */ |
||
78 | public function mapBundles() |
||
98 | |||
99 | /** |
||
100 | * Get paths to all bundle files. |
||
101 | * |
||
102 | * @return Collection |
||
103 | */ |
||
104 | protected function getPathCollection() |
||
124 | |||
125 | /** |
||
126 | * Get array of keys describing file path. |
||
127 | * |
||
128 | * @param string $path |
||
129 | * |
||
130 | * @return array |
||
131 | */ |
||
132 | protected function getPathKeys($path) |
||
138 | |||
139 | /** |
||
140 | * Register file paths as auto aliases. |
||
141 | * |
||
142 | * @param Collection $pathKeys |
||
143 | */ |
||
144 | protected function registerAlias(Collection $pathKeys) |
||
152 | |||
153 | /** |
||
154 | * Map content on bundleMap. |
||
155 | * |
||
156 | * @param array $content |
||
157 | * @param array $pathKeys |
||
158 | */ |
||
159 | protected function mapContent(array $content, array $pathKeys) |
||
169 | } |
||
170 |