| @@ 639-646 (lines=8) @@ | ||
| 636 | * | |
| 637 | * @return string | |
| 638 | */ | |
| 639 | private function filterPath(string $path) : string | |
| 640 |     { | |
| 641 | return preg_replace_callback( | |
| 642 |             '/(?:[^' . static::CHAR_UNRESERVED . static::CHAR_SUB_DELIMS . ':@\/%]+|%(?![A-Fa-f0-9]{2}))/', | |
| 643 | [$this, 'rawurlencodeMatchZero'], | |
| 644 | $path | |
| 645 | ); | |
| 646 | } | |
| 647 | ||
| 648 | /** | |
| 649 | * Filters the query string or fragment of a URI. | |
| @@ 655-662 (lines=8) @@ | ||
| 652 | * | |
| 653 | * @return string | |
| 654 | */ | |
| 655 | private function filterQueryAndFragment(string $str) : string | |
| 656 |     { | |
| 657 | return preg_replace_callback( | |
| 658 |             '/(?:[^' . static::CHAR_UNRESERVED . static::CHAR_SUB_DELIMS . '%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/', | |
| 659 | [$this, 'rawurlencodeMatchZero'], | |
| 660 | $str | |
| 661 | ); | |
| 662 | } | |
| 663 | ||
| 664 | private function rawurlencodeMatchZero(array $match) : string | |
| 665 |     { | |