Lines Matching refs:uri
111 * @param string $uri
114 function normalize($uri) { argument
116 $parts = parse($uri);
178 * @param string $uri
181 function parse($uri) { argument
188 $uri = preg_replace_callback(
193 $uri
196 $result = parse_url($uri);
198 $result = _parse_fallback($uri);
223 $uri = '';
238 $uri = $parts['scheme'] . ':';
243 $uri .= '//' . $authority;
248 $uri .= $parts['path'];
251 $uri .= '?' . $parts['query'];
254 $uri .= '#' . $parts['fragment'];
257 return $uri;
299 * @param string $uri
302 function _parse_fallback($uri) { argument
309 $uri = preg_replace_callback(
314 $uri
327 if (preg_match('% ^([A-Za-z][A-Za-z0-9+-\.]+): %x', $uri, $matches)) {
331 $uri = substr($uri, strlen($result['scheme']) + 1);
336 if (strpos($uri, '#') !== false) {
337 list($uri, $result['fragment']) = explode('#', $uri, 2);
340 if (strpos($uri, '?') !== false) {
341 list($uri, $result['query']) = explode('?', $uri, 2);
344 if (substr($uri, 0, 3) === '///') {
347 $result['path'] = substr($uri, 2);
349 } elseif (substr($uri, 0, 2) === '//') {
360 if (!preg_match($regex, $uri, $matches)) {
369 $result['path'] = $uri;