Change not found callback.
This commit is contained in:
parent
6fbf9a2a72
commit
94f1857653
@ -19,10 +19,12 @@ class Router {
|
|||||||
private static $put = [];
|
private static $put = [];
|
||||||
private static $delete = [];
|
private static $delete = [];
|
||||||
private static $last;
|
private static $last;
|
||||||
public static $notFoundCallBack = function () {
|
public static $notFoundCallBack = 'Libs\Router::defaultNotFound';
|
||||||
|
|
||||||
|
private static function defaultNotFound () {
|
||||||
header("HTTP/1.0 404 Not Found");
|
header("HTTP/1.0 404 Not Found");
|
||||||
echo '<h2 style="text-align: center;margin: 25px 0px;">Error 404 - Página no encontrada</h2>';
|
echo '<h2 style="text-align: center;margin: 25px 0px;">Error 404 - Página no encontrada</h2>';
|
||||||
};
|
}
|
||||||
|
|
||||||
private function __construct() {}
|
private function __construct() {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user