public class WebContext extends Object
Cached current thread context request and response instance
构造器和说明 |
---|
WebContext(Request request,
Response response) |
限定符和类型 | 方法和说明 |
---|---|
static Blade |
blade()
Get blade instance
|
static String |
contextPath()
Get context path
|
static WebContext |
get()
Get current thread context WebContext instance
|
static void |
init(Blade blade,
String contextPath)
Initializes the project when it starts
|
static void |
remove()
Remove current thread context WebContext instance
|
static Request |
request()
Get current thread context Request instance
|
static Response |
response()
Get current thread context Response instance
|
static void |
set(WebContext webContext)
Set current thread context WebContext instance
|
public static void set(WebContext webContext)
webContext
- webContext instancepublic static WebContext get()
public static void remove()
public static Request request()
public static Response response()
public static void init(Blade blade, String contextPath)
blade
- Blade instancecontextPath
- context pathpublic static Blade blade()
public static String contextPath()
Copyright © 2017. All rights reserved.