aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/HttpResponseStatus/NotFound.php
blob: 643976cef249047a1dd6fda9784b3470c87ed39c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?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";
    }
}