MediaWiki
REL1_19
|
WebRequest clone which takes values from a provided array. More...
Public Member Functions | |
__construct ($data=array(), $wasPosted=false, $session=null) | |
checkSessionCookie () | |
Returns true if there is a session cookie set. | |
checkUrlExtension ($extWhitelist=array()) | |
getCookie ($key, $prefix=null, $default=null) | |
Get a cookie from the $_COOKIE jar. | |
getHeader ($name) | |
getQueryValues () | |
getRequestURL () | |
Return the path and query string portion of the request URI. | |
getSessionArray () | |
getSessionData ($key) | |
getText ($name, $default= '') | |
getValues () | |
isPathInfoBad ($extWhitelist=array()) | |
setHeader ($name, $val) | |
setSessionData ($key, $data) | |
wasPosted () | |
Protected Member Functions | |
getRawIP () | |
Private Member Functions | |
notImplemented ($method) | |
Private Attributes | |
$session = array() | |
$wasPosted = false |
WebRequest clone which takes values from a provided array.
Definition at line 1197 of file WebRequest.php.
FauxRequest::__construct | ( | $ | data = array() , |
$ | wasPosted = false , |
||
$ | session = null |
||
) |
$data | Array of *non*-urlencoded key => value pairs, the fake GET/POST values |
$wasPosted | Bool: whether to treat the data as POST |
$session | Mixed: session array or null |
Definition at line 1207 of file WebRequest.php.
References WebRequest\$data, $session, $wasPosted, and wasPosted().
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 WebRequest.
Reimplemented in DerivativeRequest.
Definition at line 1265 of file WebRequest.php.
FauxRequest::checkUrlExtension | ( | $ | extWhitelist = array() | ) |
array | $extWhitelist |
Reimplemented from WebRequest.
Definition at line 1325 of file WebRequest.php.
FauxRequest::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 WebRequest.
Reimplemented in DerivativeRequest.
Definition at line 1261 of file WebRequest.php.
FauxRequest::getHeader | ( | $ | name | ) |
$name |
Reimplemented from WebRequest.
Reimplemented in DerivativeRequest.
Definition at line 1277 of file WebRequest.php.
Reimplemented from WebRequest.
Definition at line 1246 of file WebRequest.php.
References wasPosted().
FauxRequest::getRawIP | ( | ) | [protected] |
Definition at line 1332 of file WebRequest.php.
Return the path and query string portion of the request URI.
This will be suitable for use as a relative link in HTML output.
Reimplemented from WebRequest.
Definition at line 1269 of file WebRequest.php.
References notImplemented().
Definition at line 1309 of file WebRequest.php.
FauxRequest::getSessionData | ( | $ | key | ) |
$key |
Reimplemented from WebRequest.
Reimplemented in DerivativeRequest.
Definition at line 1293 of file WebRequest.php.
FauxRequest::getText | ( | $ | name, |
$ | default = '' |
||
) |
$name | string |
$default | string |
Reimplemented from WebRequest.
Definition at line 1231 of file WebRequest.php.
References WebRequest\getVal().
FauxRequest::isPathInfoBad | ( | $ | extWhitelist = array() | ) |
FauxRequest::notImplemented | ( | $ | method | ) | [private] |
$method | string |
MWException |
Definition at line 1222 of file WebRequest.php.
Referenced by getRequestURL().
FauxRequest::setHeader | ( | $ | name, |
$ | val | ||
) |
$name | string |
$val | string |
Definition at line 1285 of file WebRequest.php.
FauxRequest::setSessionData | ( | $ | key, |
$ | data | ||
) |
$key | |
$data |
Reimplemented from WebRequest.
Reimplemented in DerivativeRequest.
Definition at line 1302 of file WebRequest.php.
References WebRequest\$data.
Reimplemented from WebRequest.
Definition at line 1257 of file WebRequest.php.
Referenced by __construct(), and getQueryValues().
FauxRequest::$session = array() [private] |
Definition at line 1199 of file WebRequest.php.
Referenced by __construct().
Definition at line 1198 of file WebRequest.php.
Referenced by __construct(), and DerivativeRequest\__construct().