ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables 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, ImmutableStringMap $metaData, ProcessingStatus $status, string $path)
 UploadResult constructor. More...
 
 getName ()
 
 getSize ()
 
 getMimeType ()
 
 getMetaData ()
 
 getStatus ()
 
 isOK ()
 
 getPath ()
 

Private Attributes

string $name
 
int $size
 
string $mimeType
 
ImmutableStringMap $metaData
 
ProcessingStatus $status
 
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 33 of file UploadResult.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\FileUpload\DTO\UploadResult::__construct ( string  $name,
int  $size,
string  $mimeType,
ImmutableStringMap  $metaData,
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 57 of file UploadResult.php.

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

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

Member Function Documentation

◆ getMetaData()

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

Definition at line 103 of file UploadResult.php.

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

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

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

◆ getMimeType()

◆ getName()

◆ getPath()

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

Definition at line 127 of file UploadResult.php.

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

Referenced by ILIAS\FileUpload\FileUploadImpl\moveOneFileTo(), ilObjCertificateSettings\uploadBackgroundImage(), and ilIndividualAssessmentFileStorage\uploadFile().

127  : string
128  {
129  return $this->path;
130  }
+ Here is the caller graph for this function:

◆ getSize()

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

◆ getStatus()

◆ isOK()

Field Documentation

◆ $metaData

ImmutableStringMap ILIAS\FileUpload\DTO\UploadResult::$metaData
private

◆ $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

◆ $status

ProcessingStatus ILIAS\FileUpload\DTO\UploadResult::$status
private

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