MediaWiki
REL1_20
|
Similar to FauxRequest, but only fakes URL parameters and method (POST or GET) and use the base request for the remaining stuff (cookies, session and headers). More...
Public Member Functions | |
__construct (WebRequest $base, $data, $wasPosted=false) | |
checkSessionCookie () | |
Returns true if there is a session cookie set. | |
getAcceptLang () | |
getAllHeaders () | |
Get an array containing all request headers. | |
getCookie ($key, $prefix=null, $default=null) | |
Get a cookie from the $_COOKIE jar. | |
getHeader ($name) | |
getIP () | |
getSessionData ($key) | |
setSessionData ($key, $data) | |
Private Attributes | |
$base |
Similar to FauxRequest, but only fakes URL parameters and method (POST or GET) and use the base request for the remaining stuff (cookies, session and headers).
Definition at line 1382 of file WebRequest.php.
DerivativeRequest::__construct | ( | WebRequest $ | base, |
$ | data, | ||
$ | wasPosted = false |
||
) |
Definition at line 1385 of file WebRequest.php.
References $base, WebRequest\$data, FauxRequest\$wasPosted, and WebRequest\__construct().
Returns true if there is a session cookie set.
This does not necessarily mean that the user is logged in!
If you want to check for an open session, use session_id() instead; that will also tell you if the session was opened during the current request (in which case the cookie will be sent back to the client at the end of the script run).
Reimplemented from FauxRequest.
Definition at line 1394 of file WebRequest.php.
Definition at line 1414 of file WebRequest.php.
Get an array containing all request headers.
Reimplemented from WebRequest.
Definition at line 1402 of file WebRequest.php.
DerivativeRequest::getCookie | ( | $ | key, |
$ | prefix = null , |
||
$ | default = null |
||
) |
Get a cookie from the $_COOKIE jar.
$key | String: the name of the cookie |
$prefix | String: a prefix to use for the cookie name, if not $wgCookiePrefix |
$default | Mixed: what to return if the value isn't found |
Reimplemented from FauxRequest.
Definition at line 1390 of file WebRequest.php.
DerivativeRequest::getHeader | ( | $ | name | ) |
$name |
Reimplemented from FauxRequest.
Definition at line 1398 of file WebRequest.php.
Definition at line 1418 of file WebRequest.php.
DerivativeRequest::getSessionData | ( | $ | key | ) |
$key |
Reimplemented from FauxRequest.
Definition at line 1406 of file WebRequest.php.
DerivativeRequest::setSessionData | ( | $ | key, |
$ | data | ||
) |
$key | |
$data |
Reimplemented from FauxRequest.
Definition at line 1410 of file WebRequest.php.
DerivativeRequest::$base [private] |
Definition at line 1383 of file WebRequest.php.
Referenced by __construct().