header('Content-Type: application/json; charset=utf-8'); echo json_encode($value, $options, $dept); exit(0); } SimpleRouter::response()->json($value, $options, $dept); } public static function apiError(string $value, int $code): void { Response::response()->header('Content-Type: application/json; charset=utf-8')->httpCode($code); echo $value; exit(0); } public static function redirect(string $url, ?int $code = null): void { if ($code !== null) { Response::response()->httpCode($code); } Response::response()->redirect($url); } }