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()) |
||
52 | |||
53 | /** |
||
54 | * @param string $path |
||
55 | * |
||
56 | * @throws NotLoadableException |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function locate($path) |
||
73 | |||
74 | /** |
||
75 | * @param string $path |
||
76 | * |
||
77 | * @return bool|string |
||
78 | */ |
||
79 | private function locateUsingRootPathsSearch($path) |
||
89 | |||
90 | /** |
||
91 | * @param string $path |
||
92 | * |
||
93 | * @return bool|string |
||
94 | */ |
||
95 | private function locateUsingRootPlaceholder($path) |
||
108 | |||
109 | /** |
||
110 | * @param string $root |
||
111 | * @param string $path |
||
112 | * |
||
113 | * @return string|false |
||
114 | */ |
||
115 | protected function generateAbsolutePath($root, $path) |
||
119 | |||
120 | /** |
||
121 | * @param string $root |
||
122 | * |
||
123 | * @throws InvalidArgumentException |
||
124 | * |
||
125 | * @return string |
||
126 | */ |
||
127 | private function sanitizeRootPath($root) |
||
135 | |||
136 | /** |
||
137 | * @param string $path |
||
138 | * |
||
139 | * @throws NotLoadableException |
||
140 | * |
||
141 | * @return string |
||
142 | */ |
||
143 | private function sanitizeAbsolutePath($path) |
||
154 | } |
||
155 |
If you suppress an error, we recommend checking for the error condition explicitly: