MediaWiki  1.23.2
WebRequestUpload Class Reference

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...
 
 isIniSizeOverflow ()
 Returns whether this upload failed because of overflow of a maximum set in php.ini. More...
 

Protected Attributes

 $doesExist
 
 $fileInfo
 
 $request
 

Detailed Description

Object to access the $_FILES array.

Definition at line 1159 of file WebRequest.php.

Constructor & Destructor Documentation

◆ __construct()

WebRequestUpload::__construct (   $request,
  $key 
)

Constructor.

Should only be called by WebRequest

Parameters
$requestWebRequest The associated request
string$keyKey in $_FILES array (name of form field)

Definition at line 1170 of file WebRequest.php.

Member Function Documentation

◆ exists()

WebRequestUpload::exists ( )

Return whether a file with this name was uploaded.

Returns
bool

Definition at line 1183 of file WebRequest.php.

◆ getError()

WebRequestUpload::getError ( )

Return the upload error.

See link for explanation http://www.php.net/manual/en/features.file-upload.errors.php

Returns
int One of the UPLOAD_ constants, 0 if non-existent

Definition at line 1240 of file WebRequest.php.

◆ getName()

WebRequestUpload::getName ( )

Return the original filename of the uploaded file.

Returns
mixed Filename or null if non-existent

Definition at line 1192 of file WebRequest.php.

◆ getSize()

WebRequestUpload::getSize ( )

Return the file size of the uploaded file.

Returns
int File size or zero if non-existent

Definition at line 1213 of file WebRequest.php.

◆ getTempName()

WebRequestUpload::getTempName ( )

Return the path to the temporary file.

Returns
mixed Path or null if non-existent

Definition at line 1226 of file WebRequest.php.

◆ isIniSizeOverflow()

WebRequestUpload::isIniSizeOverflow ( )

Returns whether this upload failed because of overflow of a maximum set in php.ini.

Returns
bool

Definition at line 1254 of file WebRequest.php.

Member Data Documentation

◆ $doesExist

WebRequestUpload::$doesExist
protected

Definition at line 1161 of file WebRequest.php.

◆ $fileInfo

WebRequestUpload::$fileInfo
protected

Definition at line 1162 of file WebRequest.php.

◆ $request

WebRequestUpload::$request
protected

Definition at line 1160 of file WebRequest.php.


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