aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/HttpResponseStatus/NotFound.php
blob: 1f51f8851f27c130aa48e4887ffff1a776770c78 (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 = null) {
        $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() {
    }
}