FOSSology
4.4.0
Open Source License Compliance by Open Source Software
HttpErrorException.php
1
<?php
2
/*
3
SPDX-FileCopyrightText: © 2023 Siemens AG
4
SPDX-FileContributor: Gaurav Mishra <mishra.gaurav@siemens.com>
5
6
SPDX-License-Identifier: GPL-2.0-only
7
*/
8
9
namespace
Fossology\UI\Api\Exceptions;
10
11
use Exception;
12
use Psr\Http\Message\ServerRequestInterface;
13
use Throwable;
14
18
class
HttpErrorException
extends
Exception
19
{
24
protected
ServerRequestInterface
$request
;
29
protected
array
$headers
= [];
30
31
public
function
__construct(
string
$message,
int
$code,
32
?Throwable $previous =
null
)
33
{
34
parent::__construct($message, $code, $previous);
35
}
36
40
public
function
getRequest
(): ServerRequestInterface
41
{
42
return
$this->request
;
43
}
44
49
public
function
setHeaders
(array
$headers
):
HttpErrorException
50
{
51
$this->headers =
$headers
;
52
return
$this;
53
}
54
58
public
function
getHeaders
(): array
59
{
60
return
$this->headers
;
61
}
62
}
Fossology\UI\Api\Exceptions\HttpErrorException
Definition:
HttpErrorException.php:19
Fossology\UI\Api\Exceptions\HttpErrorException\getRequest
getRequest()
Definition:
HttpErrorException.php:40
Fossology\UI\Api\Exceptions\HttpErrorException\setHeaders
setHeaders(array $headers)
Definition:
HttpErrorException.php:49
Fossology\UI\Api\Exceptions\HttpErrorException\$request
ServerRequestInterface $request
Definition:
HttpErrorException.php:24
Fossology\UI\Api\Exceptions\HttpErrorException\$headers
array $headers
Definition:
HttpErrorException.php:29
Fossology\UI\Api\Exceptions\HttpErrorException\getHeaders
getHeaders()
Definition:
HttpErrorException.php:58
src
www
ui
api
Exceptions
HttpErrorException.php
Generated on Mon Nov 18 2024 07:37:14 for FOSSology by
1.9.1