Executes post dispatch redirect

@param type $url
@param type $code
@param type $message
421192
public function redirect($url, $code = HTTP_FOUND, $message = "Moved Permanently", $alerts = [])
    {

        $response = $this->application->response;
        $uri = $this->application->createInstance(Uri::class, [$this->application->request]);

        //Before we redirect, if there are any alerts in the response,
        //Exceptional: Store alerts for future display
        if (!empty($alerts)) {
            $session = $this->application->session;

            //$session->unlock("default"); //unlock the default namespace
            $session->set("alerts", $alerts, "default");
            //$session->update( $session->getId() );
        }

        $response->setStatusCode($code);
        $response->setStatusMessage($message);
        $response->addHeader("Location", $uri->internalize($url));

        $response->sendRedirect();

        $this->abort();
    }
744927
protected static function createRedirectResponse($url, $code, $headers)
    {
        $r = new RedirectResponse($url, $code, $headers);
        $r->setRequest(Request::getInstance());

        return $r;
    }
1115530
static public function redirect($routeFrom, $routeTo, $http_response_code = 302)
    {
        $closure = function($routeTo, $replace, $http_response_code) {
            Response::$redirectHeader = [$routeTo, $replace, $http_response_code];
        };
        self::$instance->register('GET', $routeFrom, $closure, null, [$routeTo, true, $http_response_code]);
    }
30563
protected function trigger_error( $code, $message, $type = E_USER_NOTICE ){
		$trace = debug_backtrace();
		$Err = PLUG::raise_error( $code, $message, $type, $trace );
		$this->on_trigger_error( $Err );
	}
666939
public static function redirect($url, $message = '', $style = null, $hash = false) {

		return new JsonView([
			'code'    => self::SUCCESS,
			'target'  => $url,
			'hash'    => $hash,
			'message' => $message,
			'style'   => $style,
			'action'  => self::ACT_REDIRECT
		], ['ajax' => '1']);
	}
1253835
public static function redirect($location, $stop_execution=true, $code=null) {
	if (preg_match('{^(http(s)?:)?//}', $location) == false) {
		$base_url  = 'http';
		$base_url .= !empty($_SERVER['HTTPS']) ? 's' : '';
		$base_url .= '://'.$_SERVER['SERVER_NAME'];
		
		if (strpos($location, '/') !== 0) {
			$base_url .= '/';
		}
		
		$location = $base_url.$location;
	}
	
	header('Location: '.$location, $replace=true, $code);
	
	if ($stop_execution == false) {
		return;
	}
	
	exit;
}
198154
public function statusCodeAction($code = null, $message = null)
    {
        $codes = [
            403 => "403 Forbidden",
            404 => "404 Not Found",
            500 => "500 Internal Server Error",
        ];

        // Key being integer also (unintentionally) prevents this action from direct url usage
        if (!$code || !in_array($code, $codes)) {
            throw new \Anax\Exception\NotFoundException("Not a valid HTTP status code.");
        }

           $title = $codes[$code];
           $this->di->response->setHeader($code);
           $this->di->theme->setTitle($title);
           $this->di->views->add('default/error', [
            'title' => $title,
            'content' => $message,
            'details' => $this->di->flash->getMessage(),
           ]);
    }
1102046
protected function redirect($url, $statusCode = 302)
    {
        $response = new RedirectResponse($url, $statusCode);
        $this->getServiceLocator()->set('Response', $response);

        return $response;
    }
754612
public function setRedirect($location, $message = null, $code = null)
     {
         $this->_redirect = null;

         if (! empty($location)) {

             $isCallable = is_callable(array($location, '__toString'));

             if (! is_string($location) && !is_numeric($location) && !$isCallable) {
                 throw new \UnexpectedValueException(
                    'The Response location must be a string or object implementing __toString(), "'.gettype($location).'" given.'
                );
             }

             if (! $code) {
                 $code = $this->_status_code;
             }

             $this->setStatus($code, $message);
             $this->setHeader('Location', $location);
         }

         return $this;
     }
1210601
private function _alert( $type, $msg , $url  ) {
			$messages = CakeSession::read('Alerts');
		if ($messages === null){
			$messages = array();
		}
		
		$messages[] = array('type' => $type , 'msg' => $msg );
		CakeSession::write('Alerts',$messages);
		if($url){
			return $this->controller->redirect($url);
		}		
		
	//	$this->setFlash( $msg , $element , array( 'class' => $class ,'global'=> $global ) );

    }
220984
protected function redirect($url, $code = 302)
    {
        $this->response->setStatusCode($code);
        $this->response->headers->set('Location', $url);

        return $this->response;
    }
1037726
public function outputStatus($code, $message = null)
    {
        $this->addHeader($code)->sendHeaders();

        if (isset($message)) {
            echo $message;
        }

        exit;
    }
1090764
public static function early_redirect_message($encodedurl, $message, $delay) {
        $meta = '<meta http-equiv="refresh" content="'. $delay .'; url='. $encodedurl .'" />';
        $content = self::early_error_content($message, null, null, null);
        $content .= self::plain_redirect_message($encodedurl);

        return self::plain_page(get_string('redirect'), $content, $meta);
    }
767184
protected function redirect(string $url, int $httpResponseCode = 302): void
    {
        header('Location: ' . $url, true, $httpResponseCode);
        exit;
    }
621612
protected function _redirect($url, $httpStatusCode = 302)
    {
        if (empty($url)) throw new ControllerRedirectEmptyUrlException('Cannot redirect to an empty url.');

        header('location:' . $url, true, $httpStatusCode);
        exit;
    }
860459
public function log($message, $code = self::INFO) {
		$this->adapter->log($code, $message);
	}
1314358
public function redirect($url, $code = 302)
    {
        $this->code($code);
        $this->header('Location', $url);
        $this->lock();

        return $this;
    }