1 | <?php |
||
19 | class FileSystemLocator implements LocatorInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var string[] |
||
23 | */ |
||
24 | private $roots = array(); |
||
25 | |||
26 | public function __construct(array $dataRoots = array()) |
||
30 | |||
31 | /** |
||
32 | * @param array[] $options |
||
33 | */ |
||
34 | public function setOptions(array $options = array()) |
||
47 | |||
48 | /** |
||
49 | * @param string $path |
||
50 | * |
||
51 | * @throws NotLoadableException |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | public function locate($path) |
||
68 | |||
69 | /** |
||
70 | * @param string $path |
||
71 | * |
||
72 | * @return bool|string |
||
73 | */ |
||
74 | private function locateUsingRootPathsSearch($path) |
||
84 | |||
85 | /** |
||
86 | * @param string $path |
||
87 | * |
||
88 | * @return bool|string |
||
89 | */ |
||
90 | private function locateUsingRootPlaceholder($path) |
||
103 | |||
104 | /** |
||
105 | * @param string $root |
||
106 | * @param string $path |
||
107 | * |
||
108 | * @return string|false |
||
109 | */ |
||
110 | protected function generateAbsolutePath($root, $path) |
||
114 | |||
115 | /** |
||
116 | * @param string $root |
||
117 | * |
||
118 | * @throws InvalidArgumentException |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | private function sanitizeRootPath($root) |
||
130 | |||
131 | /** |
||
132 | * @param string $path |
||
133 | * |
||
134 | * @throws NotLoadableException |
||
135 | * |
||
136 | * @return string |
||
137 | */ |
||
138 | private function sanitizeAbsolutePath($path) |
||
149 | } |
||
150 |