ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ILIAS\FileUpload\DTO\UploadResult Class Reference

Class UploadResult. More...

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

Public Member Functions

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

Private Attributes

 $name
 
 $size
 
 $mimeType
 
 $metaData
 
 $status
 
 $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 20 of file UploadResult.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\FileUpload\DTO\UploadResult::__construct (   $name,
  $size,
  $mimeType,
ImmutableStringMap  $metaData,
ProcessingStatus  $status,
  $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 62 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, ILIAS\FileUpload\DTO\UploadResult\$status, and size.

63  {
64  $this->stringTypeCheck($name, "name");
65  $this->stringTypeCheck($mimeType, "mimeType");
66  $this->stringTypeCheck($path, "path");
67  $this->intTypeCheck($size, "size");
68 
69  $this->name = $name;
70  $this->size = $size;
71  $this->mimeType = $mimeType;
72  $this->metaData = $metaData;
73  $this->status = $status;
74  $this->path = $path;
75  }
Set page orientation and size
Definition: 04printing.php:77

Member Function Documentation

◆ getMetaData()

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

Definition at line 112 of file UploadResult.php.

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

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

113  {
114  return $this->metaData;
115  }
+ Here is the caller graph for this function:

◆ getMimeType()

ILIAS\FileUpload\DTO\UploadResult::getMimeType ( )
Returns
string
Since
5.3

Definition at line 102 of file UploadResult.php.

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

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

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

◆ getName()

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

◆ getPath()

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

Definition at line 132 of file UploadResult.php.

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

Referenced by ILIAS\FileUpload\FileUploadImpl\moveOneFileTo().

133  {
134  return $this->path;
135  }
+ Here is the caller graph for this function:

◆ getSize()

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

Definition at line 92 of file UploadResult.php.

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

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

93  {
94  return $this->size;
95  }
+ Here is the caller graph for this function:

◆ getStatus()

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

Definition at line 122 of file UploadResult.php.

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

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

123  {
124  return $this->status;
125  }
+ Here is the caller graph for this function:

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: