27 $uri = $this->percentEncoder->normalize($uri);
41 $result = preg_match($r_URI, $uri, $matches);
43 if (!$result)
return false;
46 $scheme = !empty($matches[1]) ? $matches[2] : null;
47 $authority = !empty($matches[3]) ? $matches[4] : null;
49 $query = !empty($matches[6]) ? $matches[7] : null;
50 $fragment = !empty($matches[8]) ? $matches[9] : null;
53 if ($authority !== null) {
54 $r_authority =
"/^((.+?)@)?(\[[^\]]+\]|[^:]*)(:(\d*))?/";
56 preg_match($r_authority, $authority, $matches);
57 $userinfo = !empty($matches[1]) ? $matches[2] : null;
58 $host = !empty($matches[3]) ? $matches[3] :
'';
59 $port = !empty($matches[4]) ? (int) $matches[5] : null;
61 $port = $host = $userinfo = null;
65 $scheme, $userinfo, $host, $port,
$path,
$query, $fragment);