Core MVC, HTTP client, Session, Cookie, Config, HTTPException — 111 PHPUnit tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
503 B
PHP
25 lines
503 B
PHP
<?php
|
|
/**
|
|
* @package Bicycle
|
|
* @author Egor Isaev
|
|
* @description HTTPException_302.php
|
|
* @copyright (c) 04/06/2026
|
|
*/
|
|
|
|
namespace System\Classes\HTTP\Exception;
|
|
|
|
use System\Classes\HTTP;
|
|
use System\Classes\HTTP\HTTPException;
|
|
use System\Classes\Response;
|
|
|
|
class HTTPException_302 extends HTTPException
|
|
{
|
|
protected int $_code = 302;
|
|
|
|
public function get_response(): Response
|
|
{
|
|
$location = $this->getMessage() ?: '/';
|
|
HTTP::redirect($location, 302);
|
|
}
|
|
}
|