MediaWiki REL1_37
|
Handle responses for Ajax requests (send headers, print content, that sort of thing) More...
Public Member Functions | |
__construct ( $text=null, Config $config=null) | |
addText ( $text) | |
Add content to the response. | |
disable () | |
Disable output. | |
printText () | |
Output text. | |
sendHeaders () | |
Construct the header and output it. | |
setContentType ( $type) | |
Set the HTTP header Content-Type. | |
setResponseCode ( $code) | |
Set the HTTP response code. | |
Private Attributes | |
int | $mCacheDuration |
Number of seconds to get the response cached by a proxy. | |
Config | $mConfig |
string | $mContentType |
HTTP header Content-Type. | |
bool | $mDisabled |
Disables output. | |
string bool | $mLastModified |
Date for the HTTP header Last-modified. | |
int string | $mResponseCode |
HTTP response code. | |
string | $mText |
Content of our HTTP response. | |
string | $mVary |
HTTP Vary header. | |
Handle responses for Ajax requests (send headers, print content, that sort of thing)
Definition at line 31 of file AjaxResponse.php.
AjaxResponse::__construct | ( | $text = null , |
|
Config | $config = null |
||
) |
string | null | $text | |
Config | null | $config |
Definition at line 83 of file AjaxResponse.php.
References addText().
AjaxResponse::addText | ( | $text | ) |
Add content to the response.
string | $text |
Definition at line 126 of file AjaxResponse.php.
Referenced by __construct().
AjaxResponse::disable | ( | ) |
Disable output.
Definition at line 118 of file AjaxResponse.php.
AjaxResponse::printText | ( | ) |
AjaxResponse::sendHeaders | ( | ) |
Construct the header and output it.
Definition at line 144 of file AjaxResponse.php.
AjaxResponse::setContentType | ( | $type | ) |
Set the HTTP header Content-Type.
string | $type |
Definition at line 111 of file AjaxResponse.php.
References $type.
AjaxResponse::setResponseCode | ( | $code | ) |
Set the HTTP response code.
int | string | $code |
Definition at line 103 of file AjaxResponse.php.
|
private |
Number of seconds to get the response cached by a proxy.
Definition at line 36 of file AjaxResponse.php.
|
private |
Definition at line 77 of file AjaxResponse.php.
|
private |
HTTP header Content-Type.
Definition at line 42 of file AjaxResponse.php.
|
private |
Disables output.
Can be set by calling $AjaxResponse->disable()
Definition at line 48 of file AjaxResponse.php.
|
private |
Date for the HTTP header Last-modified.
Definition at line 54 of file AjaxResponse.php.
|
private |
HTTP response code.
Definition at line 60 of file AjaxResponse.php.
|
private |
Content of our HTTP response.
Definition at line 72 of file AjaxResponse.php.
Referenced by printText().
|
private |
HTTP Vary header.
Definition at line 66 of file AjaxResponse.php.