MediaWiki master
MediaWiki\Request\FauxRequestUpload Class Reference

Object to fake the $_FILES array. More...

Inherits MediaWiki\Request\WebRequestUpload.

Collaboration diagram for MediaWiki\Request\FauxRequestUpload:

Public Member Functions

 __construct ( $data, $request, $key)
 Constructor.
 
- Public Member Functions inherited from MediaWiki\Request\WebRequestUpload
 __construct ( $request, $key)
 Constructor.
 
 exists ()
 Return whether a file with this name was uploaded.
 
 getError ()
 Return the upload error.
 
 getName ()
 Return the original filename of the uploaded file.
 
 getSize ()
 Return the file size of the uploaded file.
 
 getTempName ()
 Return the path to the temporary file.
 
 getType ()
 Return the client specified content type.
 
 isIniSizeOverflow ()
 Returns whether this upload failed because of overflow of a maximum set in php.ini.
 

Additional Inherited Members

- Public Attributes inherited from MediaWiki\Request\WebRequestUpload
const REQUIRED_FILEINFO_KEYS = [ 'name', 'size', 'tmp_name', 'type', 'error', ]
 All keys a fileinfo has to specific to work with this class.
 
- Protected Attributes inherited from MediaWiki\Request\WebRequestUpload
bool $doesExist
 
array null $fileInfo
 
WebRequest $request
 

Detailed Description

Object to fake the $_FILES array.

Since
1.37

Definition at line 31 of file FauxRequestUpload.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Request\FauxRequestUpload::__construct (   $data,
  $request,
  $key 
)

Constructor.

Should only be called by MediaWiki\Request\FauxRequest

Parameters
array$dataArray of non-urlencoded key => value pairs, the fake (whole) FILES values
FauxRequest$requestThe associated faux request
string$keyname of upload param

Definition at line 41 of file FauxRequestUpload.php.

References MediaWiki\Request\WebRequestUpload\$request.


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