$callback) { // -------------------------------------------------------------- // Only check routes that have multiple URIs or wildcards. // All other routes would have been caught by a literal match. // -------------------------------------------------------------- if (strpos($keys, '(') !== false or strpos($keys, ',') !== false ) { // -------------------------------------------------------------- // Routes can be comma-delimited, so spin through each one. // -------------------------------------------------------------- foreach (explode(', ', $keys) as $route) { $route = str_replace(':num', '[0-9]+', str_replace(':any', '[a-zA-Z0-9\-_]+', $route)); if (preg_match('#^'.$route.'$#', $method.' '.$uri)) { return new Route($callback, Route\Parser::parameters($uri, $route)); } } } } } }