public function matchUrl($url)
    {
        $url = '/' . ltrim($url, '/');
        $url = $this->sanitizeUrl($url);

        if ($url && $route = $this->matchUrlDirectly($url)) {
            return $route;
        }
        if ($url && $route = $this->matchUrlWithParameters($url)) {
            return $route;
        }
        return null;
    }