/** * 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); }
/** * @param string $route controller/action * @param array $params * @param null $https * @param bool $asset * * @return string */ function url($route = '', array $params = array(), $https = null, $asset = false) { return \Pimf\Url::compute($route, $params, $https, $asset); }