Files
kiri-router/src/Base/NotFoundController.php
T
2025-12-30 21:43:56 +08:00

27 lines
503 B
PHP

<?php
declare(strict_types=1);
namespace Kiri\Router\Base;
use Psr\Http\Message\ResponseInterface;
class NotFoundController extends Controller
{
/**
* @return ResponseInterface
*/
public function fail(): ResponseInterface
{
var_dump($this->request->getMethod());
if ($this->request->getMethod() == 'OPTIONS') {
return $this->response->html('');
} else {
return $this->response->withStatus(404, "not found page.");
}
}
}