From 94f185765352023247e10c417195446dafbbbbe9 Mon Sep 17 00:00:00 2001 From: kj Date: Sat, 27 Nov 2021 19:21:13 -0400 Subject: [PATCH] Change not found callback. --- src/Libs/Router.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Libs/Router.php b/src/Libs/Router.php index 3c9e6dc..23053fd 100644 --- a/src/Libs/Router.php +++ b/src/Libs/Router.php @@ -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 '

Error 404 - Página no encontrada

'; - }; + } private function __construct() {}