From f5041d524fe7d735c03dfa0f36c48023ed13a160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Fabr=C3=A9gat?= Date: Sun, 4 Mar 2018 11:04:56 +0100 Subject: [PATCH] adding ForbiddenResponse --- composer.json | 2 +- src/ForbiddenResponse.php | 48 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 src/ForbiddenResponse.php diff --git a/composer.json b/composer.json index 0c887e9..7f88e85 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "codeinchq/lib-psr7responses", - "version": "1.1.5", + "version": "1.1.6", "description": "A collection of PSR-7 responses", "homepage": "https://github.com/codeinchq/lib-psr7responses", "type": "library", diff --git a/src/ForbiddenResponse.php b/src/ForbiddenResponse.php new file mode 100644 index 0000000..37c8c34 --- /dev/null +++ b/src/ForbiddenResponse.php @@ -0,0 +1,48 @@ + +// Date: 23/02/2018 +// Time: 19:22 +// Project: lib-psr7responses +// +declare(strict_types = 1); +namespace CodeInc\Psr7Responses; + + +/** + * Class ForbiddenResponse + * + * @package CodeInc\Psr7Responses + * @author Joan Fabrégat + */ +class ForbiddenResponse extends HtmlResponse { + /** + * NotFoundResponse constructor. + * + * @param string|null $html + * @param null|string $charset + * @param array $headers + * @param null $body + * @param string $version + * @param null|string $reason + */ + public function __construct(string $html = null, ?string $charset = null, array $headers = [], + $body = null, string $version = '1.1', ?string $reason = null) + { + parent::__construct($html ?? '', $charset, 403, $headers, $version, $reason); + } +} \ No newline at end of file