ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

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

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  }

Member Function Documentation

◆ getMetaData()

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

Definition at line 102 of file UploadResult.php.

Referenced by ilObjFile\appendUpload(), and ilObjFile\replaceWithUpload().

102  : ImmutableStringMap
103  {
104  return $this->metaData;
105  }
+ Here is the caller graph for this function:

◆ getMimeType()

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

◆ getName()

◆ getPath()

◆ getSize()

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

Definition at line 84 of file UploadResult.php.

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

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

◆ getStatus()

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

Definition at line 111 of file UploadResult.php.

Referenced by ILIAS\ResourceStorage\Manager\BaseManager\appendNewRevision(), ilWebDAVMountInstructionsDocumentFormGUI\getRawMountInstructionsFromFileUpload(), ILIAS\ResourceStorage\Manager\BaseManager\replaceWithUpload(), and ILIAS\ResourceStorage\Manager\Manager\upload().

111  : ProcessingStatus
112  {
113  return $this->status;
114  }
+ Here is the caller graph for this function:

◆ isOK()

ILIAS\FileUpload\DTO\UploadResult::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: