MediaWiki
master
|
Object to access the $_FILES array. More...
Public Member Functions | |
__construct ( $request, $key) | |
Constructor. More... | |
exists () | |
Return whether a file with this name was uploaded. More... | |
getError () | |
Return the upload error. More... | |
getName () | |
Return the original filename of the uploaded file. More... | |
getSize () | |
Return the file size of the uploaded file. More... | |
getTempName () | |
Return the path to the temporary file. More... | |
getType () | |
Return the client specified content type. More... | |
isIniSizeOverflow () | |
Returns whether this upload failed because of overflow of a maximum set in php.ini. More... | |
Public Attributes | |
const | REQUIRED_FILEINFO_KEYS = [ 'name', 'size', 'tmp_name', 'type', 'error', ] |
All keys a fileinfo has to specific to work with this class. More... | |
Protected Attributes | |
bool | $doesExist |
array null | $fileInfo |
WebRequest | $request |
Object to access the $_FILES array.
Definition at line 37 of file WebRequestUpload.php.
GuzzleHttp\Psr7\Request\WebRequestUpload::__construct | ( | $request, | |
$key | |||
) |
Constructor.
Should only be called by WebRequest
WebRequest | $request | The associated request |
string | $key | Key in $_FILES array (name of form field) |
Definition at line 53 of file WebRequestUpload.php.
References GuzzleHttp\Psr7\Request\WebRequestUpload\$request.
GuzzleHttp\Psr7\Request\WebRequestUpload::exists | ( | ) |
Return whether a file with this name was uploaded.
Definition at line 66 of file WebRequestUpload.php.
References GuzzleHttp\Psr7\Request\WebRequestUpload\$doesExist.
Referenced by GuzzleHttp\Psr7\Request\WebRequestUpload\getError(), GuzzleHttp\Psr7\Request\WebRequestUpload\getName(), GuzzleHttp\Psr7\Request\WebRequestUpload\getSize(), GuzzleHttp\Psr7\Request\WebRequestUpload\getTempName(), and GuzzleHttp\Psr7\Request\WebRequestUpload\getType().
GuzzleHttp\Psr7\Request\WebRequestUpload::getError | ( | ) |
Return the upload error.
See link for explanation https://www.php.net/manual/en/features.file-upload.errors.php
Definition at line 141 of file WebRequestUpload.php.
References GuzzleHttp\Psr7\Request\WebRequestUpload\exists().
Referenced by GuzzleHttp\Psr7\Request\WebRequestUpload\isIniSizeOverflow().
GuzzleHttp\Psr7\Request\WebRequestUpload::getName | ( | ) |
Return the original filename of the uploaded file.
Definition at line 75 of file WebRequestUpload.php.
References Sanitizer\decodeCharReferences(), GuzzleHttp\Psr7\Request\WebRequestUpload\exists(), MediaWiki\MediaWikiServices\getInstance(), and wfDebug().
GuzzleHttp\Psr7\Request\WebRequestUpload::getSize | ( | ) |
Return the file size of the uploaded file.
Definition at line 97 of file WebRequestUpload.php.
References GuzzleHttp\Psr7\Request\WebRequestUpload\exists().
GuzzleHttp\Psr7\Request\WebRequestUpload::getTempName | ( | ) |
Return the path to the temporary file.
Definition at line 111 of file WebRequestUpload.php.
References GuzzleHttp\Psr7\Request\WebRequestUpload\exists().
GuzzleHttp\Psr7\Request\WebRequestUpload::getType | ( | ) |
Return the client specified content type.
Definition at line 126 of file WebRequestUpload.php.
References GuzzleHttp\Psr7\Request\WebRequestUpload\exists().
GuzzleHttp\Psr7\Request\WebRequestUpload::isIniSizeOverflow | ( | ) |
Returns whether this upload failed because of overflow of a maximum set in php.ini.
Definition at line 156 of file WebRequestUpload.php.
References GuzzleHttp\Psr7\Request\WebRequestUpload\getError(), and wfShorthandToInteger().
|
protected |
Definition at line 43 of file WebRequestUpload.php.
Referenced by GuzzleHttp\Psr7\Request\WebRequestUpload\exists().
|
protected |
Definition at line 45 of file WebRequestUpload.php.
|
protected |
Definition at line 41 of file WebRequestUpload.php.
Referenced by GuzzleHttp\Psr7\Request\FauxRequestUpload\__construct(), and GuzzleHttp\Psr7\Request\WebRequestUpload\__construct().
const GuzzleHttp\Psr7\Request\WebRequestUpload::REQUIRED_FILEINFO_KEYS = [ 'name', 'size', 'tmp_name', 'type', 'error', ] |
All keys a fileinfo has to specific to work with this class.
Definition at line 39 of file WebRequestUpload.php.
Referenced by GuzzleHttp\Psr7\Request\FauxRequest\setUpload().