blob: 0e7d0250d0d600ce46ec37c96a826ecefe1d0ca7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
namespace Engelsystem\Http\Exceptions;
class HttpRedirect extends HttpException
{
/**
* @param string $url
* @param int $statusCode
* @param array $headers
*/
public function __construct(
string $url,
int $statusCode = 302,
array $headers = []
) {
$headers = array_merge([
'Location' => $url,
], $headers);
parent::__construct($statusCode, '', $headers);
}
}
|