public function redirectTo($route = null)
    {
        if (is_null($route)) {
            $url = $this->di->request->getCurrentUrl();
        } else {
            $url = $this->di->url->create($route);
        }
        $this->di->response->redirect($url);
    }
public function redirectTo($route = null)
    {
        if (is_null($route)) {
            $url = $this->di->request->getCurrentUrl();
        } else {
            $url = $this->di->url->create($route);
        }
        $this->di->response->redirect($url);
    }
public function redirectTo ( $ route = null ) { if ( is_null ( $ route ) ) { $ url = $ this -> di -> request -> getCurrentUrl ( ) ; } else { $ url = $ this -> di -> url -> create ( $ route ) ; } $ this -> di -> response -> redirect ( $ url ) ; }
Redirect to current or another route.

@param string $route the route to redirect to,
null to redirect to current route, "" to redirect to baseurl.

@return void
Redirect to current or another route .