diff --git a/README.md b/README.md index e6201e4..a16e81d 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ This PHP 7.1 library provides a collection of [PSR-7](https://www.php-fig.org/ps * [`JsonResponse`](src/JsonResponse.php) * [`LocalFileResponse`](src/LocalFileResponse.php) * [`NotFoundResponse`](src/NotFoundResponse.php) +* [`NotModifiedResponse`](src/NotModifiedResponse.php) * [`RedirectResponse`](src/RedirectResponse.php) * [`StreamResponse`](src/StreamResponse.php) * [`TextResponse`](src/TextResponse.php) diff --git a/composer.json b/composer.json index fbc6d92..ad71326 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "codeinc/psr7-responses", - "version": "2.1.0", + "version": "2.1.1", "description": "A collection of PSR-7 responses", "homepage": "https://github.com/CodeIncHQ/Psr7Responses", "type": "library", diff --git a/src/NotModifiedResponse.php b/src/NotModifiedResponse.php new file mode 100644 index 0000000..23ffa51 --- /dev/null +++ b/src/NotModifiedResponse.php @@ -0,0 +1,45 @@ + +// Date: 08/10/2018 +// Project: Psr7Responses +// +declare(strict_types=1); +namespace CodeInc\Psr7Responses; + +/** + * Class NotModifiedResponse + * + * @package CodeInc\Psr7Responses + * @author Joan Fabrégat + */ +class NotModifiedResponse extends EmptyResponse +{ + /** + * NotModifiedResponse constructor. + * + * @param int $code + * @param string $reasonPhrase + * @param array $headers + * @param string $version + */ + public function __construct(int $code = 304, string $reasonPhrase = '', + array $headers = [], string $version = '1.1') + { + parent::__construct($code, $reasonPhrase, $headers, $version); + } +} \ No newline at end of file