MediaWiki master
Wikimedia\ParamValidator\Util\UploadedFile Class Reference

A simple implementation of UploadedFileInterface. More...

Inherits UploadedFileInterface.

Collaboration diagram for Wikimedia\ParamValidator\Util\UploadedFile:

Public Member Functions

 __construct (array $data, $fromUpload=true)
 
 getClientFilename ()
 
 getClientMediaType ()
 
 getError ()
 
 getSize ()
 
 getStream ()
 
 moveTo ( $targetPath)
 

Detailed Description

A simple implementation of UploadedFileInterface.

This exists so ParamValidator needn't depend on any specific PSR-7 implementation for a class implementing UploadedFileInterface. It shouldn't be used directly by other code, other than perhaps when implementing Callbacks::getUploadedFile() when another PSR-7 library is not already in use.

Since
1.34
Stability: unstable

Definition at line 20 of file UploadedFile.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\ParamValidator\Util\UploadedFile::__construct ( array $data,
$fromUpload = true )
Parameters
array$dataData from $_FILES
bool$fromUploadSet false if using this task with data not from $_FILES. Intended for unit testing.

Definition at line 39 of file UploadedFile.php.

Member Function Documentation

◆ getClientFilename()

Wikimedia\ParamValidator\Util\UploadedFile::getClientFilename ( )

Definition at line 129 of file UploadedFile.php.

◆ getClientMediaType()

Wikimedia\ParamValidator\Util\UploadedFile::getClientMediaType ( )

Definition at line 134 of file UploadedFile.php.

◆ getError()

Wikimedia\ParamValidator\Util\UploadedFile::getError ( )

Definition at line 125 of file UploadedFile.php.

◆ getSize()

Wikimedia\ParamValidator\Util\UploadedFile::getSize ( )

Definition at line 121 of file UploadedFile.php.

◆ getStream()

Wikimedia\ParamValidator\Util\UploadedFile::getStream ( )

Definition at line 86 of file UploadedFile.php.

◆ moveTo()

Wikimedia\ParamValidator\Util\UploadedFile::moveTo ( $targetPath)

Definition at line 96 of file UploadedFile.php.


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