ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Metadata.php
Go to the documentation of this file.
1 <?php
2 
4 
8 
21 final class Metadata
22 {
27  private $filename;
31  private $uploadSize;
35  private $mimeType;
40 
41 
53  public function __construct($filename, $size, $mimeType)
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
__construct($filename, $size, $mimeType)
Metadata constructor.
Definition: Metadata.php:53
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
getFilename()
The filename supplied by the browser.
Definition: Metadata.php:73
getUploadSize()
This is always the original file size which was determined by the http service.
Definition: Metadata.php:105
setFilename($filename)
Overwrite the current filename.
Definition: Metadata.php:87
setMimeType($mimeType)
Overwrite the current mime type of the file.
Definition: Metadata.php:132