/**
* Generic parse function for missing or legacy component router
*
* @param array &$segments The segments of the URL to parse.
*
* @return array The URL attributes to be used by the application.
*
* @since 3.3
*/
public function parse(&$segments)
{
$function = $this->component . 'ParseRoute';
if (\function_exists($function)) {
$total = \count($segments);
for ($i = 0; $i < $total; $i++) {
$segments[$i] = preg_replace('/-/', ':', $segments[$i], 1);
}
return $function($segments);
}
return array();
}