__toString()); }else{ return Response::Json($content); } } case "array":{ Response::Json($content); break; } default:{ throw new Exception("unknown type"); } } } public static function Redirect($path, $code = 307) { http_response_code($code); header("location: $path"); } }; define("response", new Response(), false);