mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-09 11:24:35 +02:00
build
git-tools
phpBB
adm
assets
bin
cache
config
develop
docs
download
ext
files
images
includes
install
install_new
language
phpbb
auth
avatar
cache
captcha
config
console
controller
cron
db
di
event
exception
exception_interface.php
http_exception.php
runtime_exception.php
extension
feed
filesystem
group
groupposition
help
hook
install
language
lock
log
message
mimetype
module
notification
passwords
php
plupload
profilefields
report
request
routing
search
template
textformatter
textreparser
tree
class_loader.php
composer.json
config_php_file.php
content_visibility.php
datetime.php
error_collector.php
file_downloader.php
filesystem.php
finder.php
json_response.php
pagination.php
path_helper.php
permissions.php
recursive_dot_prefix_filter_iterator.php
session.php
symfony_request.php
user.php
user_loader.php
version_helper.php
viewonline_helper.php
store
styles
.htaccess
app.php
common.php
composer.json
composer.lock
cron.php
faq.php
feed.php
index.php
mcp.php
memberlist.php
posting.php
report.php
search.php
ucp.php
viewforum.php
viewonline.php
viewtopic.php
web.config
tests
travis
.editorconfig
.gitignore
.jscsrc
.jshintrc
.travis.yml
CONTRIBUTING.md
README.md
composer.phar
phpunit.xml.dist
71 lines
1.6 KiB
PHP
71 lines
1.6 KiB
PHP
<?php
|
|
/**
|
|
*
|
|
* This file is part of the phpBB Forum Software package.
|
|
*
|
|
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
|
* @license GNU General Public License, version 2 (GPL-2.0)
|
|
*
|
|
* For full copyright and license information, please see
|
|
* the docs/CREDITS.txt file.
|
|
*
|
|
*/
|
|
|
|
namespace phpbb\exception;
|
|
|
|
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
|
|
|
|
/**
|
|
* Class http_exception
|
|
*/
|
|
class http_exception extends runtime_exception implements HttpExceptionInterface
|
|
{
|
|
/**
|
|
* Http status code.
|
|
*
|
|
* @var integer
|
|
*/
|
|
private $status_code;
|
|
|
|
/**
|
|
* Additional headers to set in the response.
|
|
*
|
|
* @var array
|
|
*/
|
|
private $headers;
|
|
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param integer $status_code The http status code.
|
|
* @param string $message The Exception message to throw (must be a language variable).
|
|
* @param array $parameters The parameters to use with the language var.
|
|
* @param \Exception $previous The previous exception used for the exception chaining.
|
|
* @param array $headers Additional headers to set in the response.
|
|
* @param integer $code The Exception code.
|
|
*/
|
|
public function __construct($status_code, $message = "", array $parameters = array(), \Exception $previous = null, array $headers = array(), $code = 0)
|
|
{
|
|
$this->status_code = $status_code;
|
|
$this->headers = $headers;
|
|
|
|
parent::__construct($message, $parameters, $previous, $code);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getStatusCode()
|
|
{
|
|
return $this->status_code;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getHeaders()
|
|
{
|
|
return $this->headers;
|
|
}
|
|
}
|