$route->onHttpError(
function ($code) {
$instance = "frontend\\controllers\\Home";
switch ($code) {
case 404:
case 405:
header("HTTP/1.1 404 Not Found");
call_user_func([new $instance, "error404"], self::$answer[0][1]);
break;
case 403:
header("HTTP/1.1 403 Forbidden");
call_user_func([new $instance, "error403"], self::$answer[0][1]);
break;
}
}
);