src/Router/Routes/Glob.php
protected function findRoute(UriInterface $url, $method = null)
    {
        $urlPath = $this->cleanUrl($url->getPath());
        $ret = null;
        
        foreach ($this as $pattern => $route) {
            list($path, $inc, $excl) = $this->splitRoutePattern($pattern);
            if ($path !== '/') $path = rtrim($path, '/');
            
            if ($this->fnmatch($path, $urlPath)) {
                if (!$method || ((empty($inc) || in_array($method, $inc)) && !in_array($method, $excl))) {
                    $ret = $route;
                    break;
                }
            }
        }

        return $ret;
    }
protected function findRoute(UriInterface $url, $method = null)
    {
        $urlPath = $this->cleanUrl($url->getPath());
        $ret = null;
        
        foreach ($this as $pattern => $route) {
            list($path, $inc, $excl) = $this->splitRoutePattern($pattern);
            if ($path !== '/') $path = rtrim($path, '/');
            
            if ($this->fnmatch($path, $urlPath)) {
                if (!$method || ((empty($inc) || in_array($method, $inc)) && !in_array($method, $excl))) {
                    $ret = $route;
                    break;
                }
            }
        }

        return $ret;
    }
protected function findRoute ( UriInterface $ url , $ method = null ) { $ urlPath = $ this -> cleanUrl ( $ url -> getPath ( ) ) ; $ ret = null ; foreach ( $ this as $ pattern => $ route ) { list ( $ path , $ inc , $ excl ) = $ this -> splitRoutePattern ( $ pattern ) ; if ( $ path !== '/' ) $ path = rtrim ( $ path , '/' ) ; if ( $ this -> fnmatch ( $ path , $ urlPath ) ) { if ( ! $ method || ( ( empty ( $ inc ) || in_array ( $ method , $ inc ) ) && ! in_array ( $ method , $ excl ) ) ) { $ ret = $ route ; break ; } } } return $ ret ; }
Find a matching route

@param UriInterface $url
@param string       $method
@return string
Find a matching route