MediaWiki
REL1_23
|
WebRequest clone which takes values from a provided array. More...
Public Member Functions | |
__construct ($data=array(), $wasPosted=false, $session=null, $protocol= 'http') | |
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) | |
getMethod () | |
Get the HTTP method used for this request. | |
getProtocol () | |
Get the current URL protocol (http or https) | |
getQueryValues () | |
getRawInput () | |
FauxRequests shouldn't depend on raw request data (but that could be implemented here) | |
getRawPostString () | |
FauxRequests shouldn't depend on raw request data (but that could be implemented here) | |
getRawQueryString () | |
FauxRequests shouldn't depend on raw request data (but that could be implemented here) | |
getRequestURL () | |
Return the path and query string portion of the request URI. | |
getSessionArray () | |
getSessionData ($key) | |
getText ($name, $default= '') | |
getValues () | |
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 1292 of file WebRequest.php.
FauxRequest::__construct | ( | $ | data = array() , |
$ | wasPosted = false , |
||
$ | session = null , |
||
$ | protocol = 'http' |
||
) |
array | $data | of *non*-urlencoded key => value pairs, the fake GET/POST values |
bool | $wasPosted | whether to treat the data as POST |
$session | Mixed: session array or null | |
string | $protocol | 'http' or 'https' |
MWException |
Definition at line 1304 of file WebRequest.php.
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 1368 of file WebRequest.php.
FauxRequest::checkUrlExtension | ( | $ | extWhitelist = array() | ) |
array | $extWhitelist |
Reimplemented from WebRequest.
Definition at line 1452 of file WebRequest.php.
FauxRequest::getCookie | ( | $ | key, |
$ | prefix = null , |
||
$ | default = null |
||
) |
Get a cookie from the $_COOKIE jar.
string | $key | the name of the cookie |
string | $prefix | 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 1364 of file WebRequest.php.
FauxRequest::getHeader | ( | $ | name | ) |
string | $name | The name of the header to get (case insensitive). |
Reimplemented from WebRequest.
Reimplemented in DerivativeRequest.
Definition at line 1384 of file WebRequest.php.
Get the HTTP method used for this request.
Reimplemented from WebRequest.
Definition at line 1353 of file WebRequest.php.
Get the current URL protocol (http or https)
Reimplemented from WebRequest.
Reimplemented in DerivativeRequest.
Definition at line 1376 of file WebRequest.php.
FauxRequests shouldn't depend on raw request data (but that could be implemented here)
Reimplemented from WebRequest.
Definition at line 1444 of file WebRequest.php.
FauxRequest::getRawIP | ( | ) | [protected] |
Definition at line 1459 of file WebRequest.php.
FauxRequests shouldn't depend on raw request data (but that could be implemented here)
Reimplemented from WebRequest.
Definition at line 1436 of file WebRequest.php.
FauxRequests shouldn't depend on raw request data (but that could be implemented here)
Reimplemented from WebRequest.
Definition at line 1428 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.
MWException |
Reimplemented from WebRequest.
Definition at line 1372 of file WebRequest.php.
Definition at line 1420 of file WebRequest.php.
FauxRequest::getSessionData | ( | $ | key | ) |
$key |
Reimplemented from WebRequest.
Reimplemented in DerivativeRequest.
Definition at line 1402 of file WebRequest.php.
FauxRequest::getText | ( | $ | name, |
$ | default = '' |
||
) |
$name | string |
$default | string |
Reimplemented from WebRequest.
Definition at line 1330 of file WebRequest.php.
FauxRequest::notImplemented | ( | $ | method | ) | [private] |
FauxRequest::setHeader | ( | $ | name, |
$ | val | ||
) |
$name | string |
$val | string |
Definition at line 1393 of file WebRequest.php.
FauxRequest::setSessionData | ( | $ | key, |
$ | data | ||
) |
$key | |
$data |
Reimplemented from WebRequest.
Reimplemented in DerivativeRequest.
Definition at line 1413 of file WebRequest.php.
FauxRequest::$session = array() [private] |
Definition at line 1294 of file WebRequest.php.
Definition at line 1293 of file WebRequest.php.