src/Sulu/Bundle/WebsiteBundle/EventListener/RedirectExceptionSubscriber.php
private function matchUrl($url)
    {
        $request = Request::create($url);
        $this->requestAnalyzer->analyze($request);

        try {
            return null !== $this->router->matchRequest($request);
        } catch (ResourceNotFoundException $exception) {
            return false;
        }
    }
private function matchUrl($url)
    {
        $request = Request::create($url);
        $this->requestAnalyzer->analyze($request);

        try {
            return null !== $this->router->matchRequest($request);
        } catch (ResourceNotFoundException $exception) {
            return false;
        }
    }
private function matchUrl ( $ url ) { $ request = Request :: create ( $ url ) ; $ this -> requestAnalyzer -> analyze ( $ request ) ; try { return null !== $ this -> router -> matchRequest ( $ request ) ; } catch ( ResourceNotFoundException $ exception ) { return false ; } }
Returns true if given url exists.

@param string $url

@return bool
Returns true if given url exists .