ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Metadata.php
Go to the documentation of this file.
1<?php
2
4
7use ILIAS\FileUpload\ScalarTypeCheckAware;
8
21final class Metadata
22{
23 use ScalarTypeCheckAware;
27 private $filename;
31 private $uploadSize;
35 private $mimeType;
40
41
54 {
55 $this->stringTypeCheck($filename, "filename");
56 $this->intTypeCheck($size, "size");
57 $this->stringTypeCheck($mimeType, "mimeType");
58
59 $this->filename = $filename;
60 $this->uploadSize = $size;
61 $this->mimeType = $mimeType;
63 }
64
65
73 public function getFilename()
74 {
75 return $this->filename;
76 }
77
78
87 public function setFilename($filename)
88 {
89 $this->stringTypeCheck($filename, "filename");
90
91 $this->filename = $filename;
92
93 return $this;
94 }
95
96
105 public function getUploadSize()
106 {
107 return $this->uploadSize;
108 }
109
110
118 public function getMimeType()
119 {
120 return $this->mimeType;
121 }
122
123
132 public function setMimeType($mimeType)
133 {
134 $this->stringTypeCheck($mimeType, "mimeType");
135
136 $this->mimeType = $mimeType;
137
138 return $this;
139 }
140
141
149 public function additionalMetaData()
150 {
152 }
153}
$size
Definition: RandomTest.php:84
An exception for terminatinating execution or to throw for unit testing.
setMimeType($mimeType)
Overwrite the current mime type of the file.
Definition: Metadata.php:132
getFilename()
The filename supplied by the browser.
Definition: Metadata.php:73
__construct($filename, $size, $mimeType)
Metadata constructor.
Definition: Metadata.php:53
setFilename($filename)
Overwrite the current filename.
Definition: Metadata.php:87
getMimeType()
Client supplied mime type of the uploaded.
Definition: Metadata.php:118
additionalMetaData()
Provides a string map implementation which allows the processors to store additional values.
Definition: Metadata.php:149
getUploadSize()
This is always the original file size which was determined by the http service.
Definition: Metadata.php:105