(string $href)
| 404 | } |
| 405 | |
| 406 | private function hrefToRelative(string $href): string |
| 407 | { |
| 408 | $path = (string)(parse_url($href, PHP_URL_PATH) ?? ''); |
| 409 | $path = rawurldecode($path); |
| 410 | $base = $this->basePath; |
| 411 | if ($base !== '' && $base !== '/' && str_starts_with($path, $base)) { |
| 412 | $path = substr($path, strlen($base)); |
| 413 | } |
| 414 | return ltrim($path, '/'); |
| 415 | } |
| 416 | |
| 417 | private function propFind(string $path, int $depth): array |
| 418 | { |