final protected function redirectToRoute($route)
    {
        $url = $this->urlBuilder->build($route);

        if ($url !== null) {
            $this->response->redirect($url);
        } else {
            throw new RuntimeException(sprintf('Unknown route supplied for redirection "%s"', $route));
        }
    }
final protected function redirectToRoute($route)
    {
        $url = $this->urlBuilder->build($route);

        if ($url !== null) {
            $this->response->redirect($url);
        } else {
            throw new RuntimeException(sprintf('Unknown route supplied for redirection "%s"', $route));
        }
    }
final protected function redirectToRoute ( $ route ) { $ url = $ this -> urlBuilder -> build ( $ route ) ; if ( $ url !== null ) { $ this -> response -> redirect ( $ url ) ; } else { throw new RuntimeException ( sprintf ( 'Unknown route supplied for redirection "%s"' , $ route ) ) ; } }
Redirects to given route

@param string $route Target route
@throws \RuntimeException if unknown route supplied
@return void
Redirects to given route