1 | <?php |
||
17 | class FileSystemLocator implements LocatorInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var string[] |
||
21 | */ |
||
22 | private $roots = []; |
||
23 | |||
24 | /** |
||
25 | * @param string[] $roots |
||
26 | */ |
||
27 | public function __construct(array $roots = []) |
||
31 | |||
32 | /** |
||
33 | * @param string $path |
||
34 | * |
||
35 | * @throws NotLoadableException |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | public function locate($path) |
||
52 | |||
53 | /** |
||
54 | * @param string $path |
||
55 | * |
||
56 | * @return bool|string |
||
57 | */ |
||
58 | private function locateUsingRootPathsSearch($path) |
||
68 | |||
69 | /** |
||
70 | * @param string $path |
||
71 | * |
||
72 | * @return bool|string |
||
73 | */ |
||
74 | private function locateUsingRootPlaceholder($path) |
||
87 | |||
88 | /** |
||
89 | * @param string $root |
||
90 | * @param string $path |
||
91 | * |
||
92 | * @return string|false |
||
93 | */ |
||
94 | protected function generateAbsolutePath($root, $path) |
||
98 | |||
99 | /** |
||
100 | * @param string $root |
||
101 | * |
||
102 | * @throws InvalidArgumentException |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | private function sanitizeRootPath($root) |
||
114 | |||
115 | /** |
||
116 | * @param string $path |
||
117 | * |
||
118 | * @throws NotLoadableException |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | private function sanitizeAbsolutePath($path) |
||
133 | } |
||
134 |