Ejemplo n.º 1
0
 /**
  * Prepares the response object to return an HTTP Redirect response to the client.
  *
  * @param string  $route     The redirect destination like controller/action
  * @param boolean $permanent If permanent redirection or not.
  * @param boolean $exit
  */
 public function redirect($route, $permanent = false, $exit = true)
 {
     $url = Url::compute($route);
     Header::clear();
     $permanent === true ? Header::sendMovedPermanently() : Header::sendFound();
     Header::toLocation($url, $exit);
 }