ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Metadata.php
Go to the documentation of this file.
1 <?php
2 
20 
24 
37 final class Metadata
38 {
40  private string $filename;
41  private int $uploadSize;
42  private string $mimeType;
44 
45 
57  public function __construct(string $filename, int $size, string $mimeType)
58  {
59  $this->stringTypeCheck($filename, "filename");
60  $this->intTypeCheck($size, "size");
61  $this->stringTypeCheck($mimeType, "mimeType");
62 
63  $this->filename = $filename;
64  $this->uploadSize = $size;
65  $this->mimeType = $mimeType;
67  }
68 
69 
76  public function getFilename(): string
77  {
78  return $this->filename;
79  }
80 
81 
89  public function setFilename(string $filename): self
90  {
91  $this->stringTypeCheck($filename, "filename");
92 
93  $this->filename = $filename;
94 
95  return $this;
96  }
97 
98 
106  public function getUploadSize(): int
107  {
108  return $this->uploadSize;
109  }
110 
111 
118  public function getMimeType(): string
119  {
120  return $this->mimeType;
121  }
122 
123 
131  public function setMimeType(string $mimeType): self
132  {
133  $this->stringTypeCheck($mimeType, "mimeType");
134 
135  $this->mimeType = $mimeType;
136 
137  return $this;
138  }
139 
140 
147  public function additionalMetaData(): StringMap
148  {
150  }
151 }
setFilename(string $filename)
Overwrite the current filename.
Definition: Metadata.php:89
setMimeType(string $mimeType)
Overwrite the current mime type of the file.
Definition: Metadata.php:131
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:147
getFilename()
The filename supplied by the browser.
Definition: Metadata.php:76
getUploadSize()
This is always the original file size which was determined by the http service.
Definition: Metadata.php:106
__construct(string $filename, int $size, string $mimeType)
Metadata constructor.
Definition: Metadata.php:57
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Metadata.php:19