else { $alter['url'
] = CoreUrl::
fromUri($path);
} } $options =
$alter['url'
]->
getOptions() +
$options;
$path =
$alter['url'
]->
setOptions($options)->
toUriString();
if (!
empty($alter['path_case'
]) &&
$alter['path_case'
] != 'none' && !
$alter['url'
]->
isRouted()) { $path =
str_replace($alter['path'
],
$this->
caseTransform($alter['path'
],
$this->options
['alter'
]['path_case'
]),
$path);
} if (!
empty($alter['replace_spaces'
])) { $path =
str_replace(' ', '-',
$path);
} // Parse the URL and move any query and fragment parameters out of the path.
$url = UrlHelper::
parse($path);
// Seriously malformed URLs may return FALSE or empty arrays.
if (empty($url)) {