private function Uri::filterPath in Lockr 7.3
Filters the path of a URI
Parameters
string $path:
Return value
string
Throws
\InvalidArgumentException If the path is invalid.
2 calls to Uri::filterPath()
- Uri::applyParts in vendor/
guzzlehttp/ psr7/ src/ Uri.php - Apply parse_url parts to a URI.
- Uri::withPath in vendor/
guzzlehttp/ psr7/ src/ Uri.php - Return an instance with the specified path.
File
- vendor/
guzzlehttp/ psr7/ src/ Uri.php, line 675
Class
- Uri
- PSR-7 URI implementation.
Namespace
GuzzleHttp\Psr7Code
private function filterPath($path) {
if (!is_string($path)) {
throw new \InvalidArgumentException('Path must be a string');
}
return preg_replace_callback('/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\\/]++|%(?![A-Fa-f0-9]{2}))/', [
$this,
'rawurlencodeMatchZero',
], $path);
}