function front_page_parse_url in Front Page 7
Same name and namespace in other branches
- 8 front_page.module \front_page_parse_url()
- 6.2 front_page.module \front_page_parse_url()
- 7.2 front_page.module \front_page_parse_url()
- 9.1.x front_page.module \front_page_parse_url()
1 call to front_page_parse_url()
File
- ./
front_page.module, line 352
Code
function front_page_parse_url($path) {
$url['path'] = $path;
$url['options'] = array();
if (preg_match('@^(?P<path>[^?#]+)(\\?(?P<query>[^#]*))?(#(?P<fragment>.*))?$@', $path, $match)) {
$url['path'] = $match['path'];
if (!empty($match['query'])) {
foreach (explode('&', $match['query']) as $query_part) {
list($key, $value) = explode('=', $query_part);
$url['options']['query'][$key] = $value;
}
}
if (!empty($match['fragment'])) {
$url['options']['fragment'] = $match['fragment'];
}
}
return $url;
}