Change not found callback.

This commit is contained in:
kj 2021-11-27 19:21:13 -04:00
parent 6fbf9a2a72
commit 94f1857653
1 changed files with 4 additions and 2 deletions

View File

@ -19,10 +19,12 @@ class Router {
private static $put = [];
private static $delete = [];
private static $last;
public static $notFoundCallBack = function () {
public static $notFoundCallBack = 'Libs\Router::defaultNotFound';
private static function defaultNotFound () {
header("HTTP/1.0 404 Not Found");
echo '<h2 style="text-align: center;margin: 25px 0px;">Error 404 - Página no encontrada</h2>';
};
}
private function __construct() {}