BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
FauxRequest Class Reference
Inheritance diagram for FauxRequest:
Collaboration diagram for FauxRequest:

Public Member Functions

 __construct ($data=[], $wasPosted=false, $session=null, $protocol= 'http')
 
 getText ($name, $default= '')
 
 getValues ()
 
 getQueryValues ()
 
 getMethod ()
 
 wasPosted ()
 
 getCookie ($key, $prefix=null, $default=null)
 
 setCookie ($key, $value, $prefix=null)
 
 setCookies ($cookies, $prefix=null)
 
 setRequestURL ($url)
 
 getRequestURL ()
 
 getProtocol ()
 
 setHeader ($name, $val)
 
 setHeaders ($headers)
 
 getSessionArray ()
 
 getRawQueryString ()
 
 getRawPostString ()
 
 getRawInput ()
 
 checkUrlExtension ($extWhitelist=[])
 
- Public Member Functions inherited from WebRequest
 getElapsedTime ()
 
 getProtocol ()
 
 interpolateTitle ()
 
 getVal ($name, $default=null)
 
 setVal ($key, $value)
 
 unsetVal ($key)
 
 getArray ($name, $default=null)
 
 getIntArray ($name, $default=null)
 
 getInt ($name, $default=0)
 
 getIntOrNull ($name)
 
 getFloat ($name, $default=0.0)
 
 getBool ($name, $default=false)
 
 getFuzzyBool ($name, $default=false)
 
 getCheck ($name)
 
 getText ($name, $default= '')
 
 getValues ()
 
 getValueNames ($exclude=[])
 
 getQueryValues ()
 
 getRawQueryString ()
 
 getRawPostString ()
 
 getRawInput ()
 
 getMethod ()
 
 wasPosted ()
 
 getSession ()
 
 setSessionId (SessionId $sessionId)
 
 getSessionId ()
 
 checkSessionCookie ()
 
 getCookie ($key, $prefix=null, $default=null)
 
 getRequestURL ()
 
 getFullRequestURL ()
 
 appendQueryValue ($key, $value)
 
 appendQueryArray ($array)
 
 getLimitOffset ($deflimit=50, $optionname= 'rclimit')
 
 getFileTempname ($key)
 
 getUploadError ($key)
 
 getFileName ($key)
 
 getUpload ($key)
 
 response ()
 
 getAllHeaders ()
 
 getHeader ($name, $flags=0)
 
 getSessionData ($key)
 
 setSessionData ($key, $data)
 
 checkUrlExtension ($extWhitelist=[])
 
 getAcceptLang ()
 
 getIP ()
 
 setIP ($ip)
 

Protected Member Functions

 initHeaders ()
 
 getRawIP ()
 
- Protected Member Functions inherited from WebRequest
 initHeaders ()
 
 doSecurityRedirect ($url)
 
 getRawIP ()
 

Protected Attributes

 $cookies = []
 
- Protected Attributes inherited from WebRequest
 $data
 
 $requestTime
 
 $protocol
 
 $sessionId = null
 

Additional Inherited Members

- Static Public Member Functions inherited from WebRequest
static getPathInfo ($want= 'all')
 
static detectServer ()
 
static detectProtocol ()
 
static getRequestId ()
 
static overrideRequestId ($id)
 
static extractTitle ($path, $bases, $key=false)
 
static getGlobalRequestURL ()
 
- Public Attributes inherited from WebRequest
 $headers = []
 
const GETHEADER_LIST = 1
 

Detailed Description

WebRequest clone which takes values from a provided array.

Constructor & Destructor Documentation

FauxRequest::__construct (   $data = [],
  $wasPosted = false,
  $session = null,
  $protocol = 'http' 
)
Parameters
array$dataArray of non-urlencoded key => value pairs, the fake GET/POST values
bool$wasPostedWhether to treat the data as POST
MediaWiki\Session\Session | array | null$sessionSession, session data array, or null
string$protocol'http' or 'https'
Exceptions
MWException

Member Function Documentation

FauxRequest::checkUrlExtension (   $extWhitelist = [])
Parameters
array$extWhitelist
Returns
bool
FauxRequest::getQueryValues ( )
Returns
array
FauxRequest::getRawInput ( )

FauxRequests shouldn't depend on raw request data (but that could be implemented here)

Returns
string
FauxRequest::getRawIP ( )
protected
Returns
string
FauxRequest::getRawPostString ( )

FauxRequests shouldn't depend on raw request data (but that could be implemented here)

Returns
string
FauxRequest::getRawQueryString ( )

FauxRequests shouldn't depend on raw request data (but that could be implemented here)

Returns
string
FauxRequest::getRequestURL ( )
Since
1.25 MWException( "getRequestURL not implemented" ) no longer thrown.
FauxRequest::getSessionArray ( )
Returns
array|null
FauxRequest::getText (   $name,
  $default = '' 
)
Parameters
string$name
string$default
Returns
string
FauxRequest::getValues ( )
Returns
array
FauxRequest::initHeaders ( )
protected

Initialise the header list

FauxRequest::setCookie (   $key,
  $value,
  $prefix = null 
)
Since
1.26
Parameters
string$nameUnprefixed name of the cookie to set
string | null$valueValue of the cookie to set
string | null$prefixCookie prefix. Defaults to $wgCookiePrefix
FauxRequest::setCookies (   $cookies,
  $prefix = null 
)
Since
1.26
Parameters
array$cookies
string | null$prefixCookie prefix. Defaults to $wgCookiePrefix
FauxRequest::setHeader (   $name,
  $val 
)
Parameters
string$name
string$val
FauxRequest::setHeaders (   $headers)
Since
1.26
Parameters
array$headers
FauxRequest::setRequestURL (   $url)
Since
1.25
FauxRequest::wasPosted ( )
Returns
bool

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