aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/HttpResponseStatus/NotFound.php
blob: 7da418700f2809cc0ab5a1af6d3032d2d10b9702 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
namespace Digitigrade\HttpResponseStatus;

use Digitigrade\HttpResponseStatus;

class NotFound extends \Exception implements HttpResponseStatus {
    public function __construct(?string $reason) {
        $this->message = $reason ?? 'Request was handled but no appropriate resource found';
    }

    public function httpCode(): int {
        return 404;
    }

    public function httpReason(): string {
        return "Not Found";
    }

    public function httpHeaders() {
    }
}