private static function hasAttributesFromUriPath($url, $path, &$attributes)
{
$i = 0;
$match = true;
$path = explode('/', $path);
foreach ($path as $j => $segment) {
if (isset($url[$i])) {
if ($segment !== $url[$i]) {
self::extractAttributesFromSegment($url, $path, $i, $j, $segment, $attributes);
}
$i++;
continue;
} elseif (!preg_match('/{[\\w]+\\?}/', $segment)) {
// No optional parameters but no more $url given this route does not match the url
$match = false;
break;
}
}
if (isset($url[$i + 1])) {
$match = false;
}
return $match;
}