MediaWiki  REL1_19
WebResponse Class Reference

Allow programs to request this object from WebRequest::response() and handle all outputting (or lack of outputting) via it. More...

Inheritance diagram for WebResponse:

List of all members.

Public Member Functions

 header ($string, $replace=true, $http_response_code=null)
 Output a HTTP header, wrapper for PHP's header()
 setcookie ($name, $value, $expire=0, $prefix=null, $domain=null)
 Set the browser cookie.

Detailed Description

Allow programs to request this object from WebRequest::response() and handle all outputting (or lack of outputting) via it.

Definition at line 28 of file WebResponse.php.


Member Function Documentation

WebResponse::header ( string,
replace = true,
http_response_code = null 
)

Output a HTTP header, wrapper for PHP's header()

Parameters:
$stringString: header to output
$replaceBool: replace current similar header
$http_response_codenull|int Forces the HTTP response code to the specified value.

Reimplemented in FauxResponse.

Definition at line 37 of file WebResponse.php.

WebResponse::setcookie ( name,
value,
expire = 0,
prefix = null,
domain = null 
)

Set the browser cookie.

Parameters:
$nameString: name of cookie
$valueString: value to give cookie
$expireInt: number of seconds til cookie expires
$prefixString: Prefix to use, if not $wgCookiePrefix (use '' for no prefix)
@domainString: Cookie domain to use, if not $wgCookieDomain

Reimplemented in FauxResponse.

Definition at line 49 of file WebResponse.php.

References $wgCookieDomain, $wgCookieExpiration, $wgCookieHttpOnly, $wgCookiePath, $wgCookiePrefix, $wgCookieSecure, wfDebugLog(), and wfHttpOnlySafe().

Here is the call graph for this function:


The documentation for this class was generated from the following file: