ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\FileUpload\DTO\UploadResult Class Reference

Class UploadResult. More...

+ Collaboration diagram for ILIAS\FileUpload\DTO\UploadResult:

Public Member Functions

 __construct (string $name, int $size, string $mimeType, private ImmutableStringMap $metaData, private ProcessingStatus $status, string $path)
 UploadResult constructor. More...
 
 getName ()
 
 getSize ()
 
 getMimeType ()
 
 getMetaData ()
 
 getStatus ()
 
 isOK ()
 
 getPath ()
 

Private Attributes

string $name
 
int $size
 
string $mimeType
 
string $path
 

Detailed Description

Class UploadResult.

The upload results are used to tell ILIAS about the file uploads. This class only purpose is to transport data.

Author
Nicolas Schäfli ns@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Since
5.3
Version
1.0

Definition at line 36 of file UploadResult.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\FileUpload\DTO\UploadResult::__construct ( string  $name,
int  $size,
string  $mimeType,
private ImmutableStringMap  $metaData,
private ProcessingStatus  $status,
string  $path 
)

UploadResult constructor.

Parameters
string$nameThe name of the uploaded file.
int$sizeThe original file size.
string$mimeTypeThe mime type of the uploaded file.
ImmutableStringMap$metaDataAdditional meta data. Make sure to wrap the instance with an ImmutableMapWrapper if the instance is mutable.
ProcessingStatus$statusThe status code either OK or REJECTED.
string$pathThe path to the newly moved file.
Since
5.3

Definition at line 58 of file UploadResult.php.

59 {
60 $this->stringTypeCheck($name, "name");
61 $this->stringTypeCheck($mimeType, "mimeType");
62 $this->stringTypeCheck($path, "path");
63 $this->intTypeCheck($size, "size");
64
65 $this->name = $name;
66 $this->size = $size;
67 $this->mimeType = $mimeType;
68 $this->path = $path;
69 }

References ILIAS\FileUpload\DTO\UploadResult\$mimeType, ILIAS\FileUpload\DTO\UploadResult\$name, ILIAS\FileUpload\DTO\UploadResult\$path, and ILIAS\FileUpload\DTO\UploadResult\$size.

Member Function Documentation

◆ getMetaData()

ILIAS\FileUpload\DTO\UploadResult::getMetaData ( )

◆ getMimeType()

◆ getName()

◆ getPath()

◆ getSize()

ILIAS\FileUpload\DTO\UploadResult::getSize ( )
Since
5.3

Definition at line 84 of file UploadResult.php.

84 : int
85 {
86 return $this->size;
87 }

References ILIAS\FileUpload\DTO\UploadResult\$size.

Referenced by ILIAS\FileUpload\FileUploadImpl\regenerateUploadResultWithCopyError(), and ILIAS\FileUpload\FileUploadImpl\regenerateUploadResultWithPath().

+ Here is the caller graph for this function:

◆ getStatus()

ILIAS\FileUpload\DTO\UploadResult::getStatus ( )
Since
5.3

Definition at line 111 of file UploadResult.php.

112 {
113 return $this->status;
114 }

Referenced by ilWebDAVMountInstructionsDocumentFormGUI\getRawMountInstructionsFromFileUpload(), and ILIAS\FileUpload\FileUploadImpl\regenerateUploadResultWithPath().

+ Here is the caller graph for this function:

◆ isOK()

Field Documentation

◆ $mimeType

string ILIAS\FileUpload\DTO\UploadResult::$mimeType
private

◆ $name

string ILIAS\FileUpload\DTO\UploadResult::$name
private

◆ $path

string ILIAS\FileUpload\DTO\UploadResult::$path
private

◆ $size

int ILIAS\FileUpload\DTO\UploadResult::$size
private

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