1 | <?php |
||
5 | final class AssetPathResolver |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | private $directory; |
||
11 | |||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | private $entrypoints; |
||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | private static $filesMap = []; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | private $manifest; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private static $DEFAULT_DIRECTORY; |
||
31 | |||
32 | public function __construct($directory = null) |
||
37 | |||
38 | public static function setDefaultDirectory($directory) |
||
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | private function getDefaultDirectory() |
||
60 | |||
61 | /** |
||
62 | * @return array |
||
63 | */ |
||
64 | private function getEntrypoints() |
||
87 | |||
88 | /** |
||
89 | * @return array |
||
90 | */ |
||
91 | private function getManifest() |
||
114 | |||
115 | /** |
||
116 | * @param $entrypoint |
||
117 | * @return array |
||
118 | */ |
||
119 | public function getWebpackJsFiles($entrypoint) |
||
134 | |||
135 | /** |
||
136 | * @param $entrypoint |
||
137 | * @return array |
||
138 | */ |
||
139 | public function getWebpackCssFiles($entrypoint) |
||
154 | |||
155 | /** |
||
156 | * @param $entrypoint |
||
157 | */ |
||
158 | public function renderWebpackScriptTags($entrypoint) |
||
168 | |||
169 | /** |
||
170 | * @param $entrypoint |
||
171 | */ |
||
172 | public function renderWebpackLinkTags($entrypoint) |
||
182 | |||
183 | /** |
||
184 | * @param $resource |
||
185 | * @return string |
||
186 | */ |
||
187 | public function getAssetPath($resource) |
||
200 | } |
||
201 |
Late static binding only has effect in subclasses. A
final
class cannot be extended anymore so late static binding cannot occurr. Consider replacingstatic::
withself::
.To learn more about late static binding, please refer to the PHP core documentation.