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

27 lines
492 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
{
if ($this->request->getMethod() == 'OPTIONS') {
var_dump($this->response);
return $this->response->html('');
} else {
return $this->response->withStatus(404, "not found page.");
}
}
}