ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Metadata.php
Go to the documentation of this file.
1 <?php
2 
4 
8 
21 final class Metadata
22 {
24  private string $filename;
25  private int $uploadSize;
26  private string $mimeType;
28 
29 
41  public function __construct(string $filename, int $size, string $mimeType)
42  {
43  $this->stringTypeCheck($filename, "filename");
44  $this->intTypeCheck($size, "size");
45  $this->stringTypeCheck($mimeType, "mimeType");
46 
47  $this->filename = $filename;
48  $this->uploadSize = $size;
49  $this->mimeType = $mimeType;
51  }
52 
53 
60  public function getFilename(): string
61  {
62  return $this->filename;
63  }
64 
65 
73  public function setFilename(string $filename): self
74  {
75  $this->stringTypeCheck($filename, "filename");
76 
77  $this->filename = $filename;
78 
79  return $this;
80  }
81 
82 
90  public function getUploadSize(): int
91  {
92  return $this->uploadSize;
93  }
94 
95 
102  public function getMimeType(): string
103  {
104  return $this->mimeType;
105  }
106 
107 
115  public function setMimeType(string $mimeType): self
116  {
117  $this->stringTypeCheck($mimeType, "mimeType");
118 
119  $this->mimeType = $mimeType;
120 
121  return $this;
122  }
123 
124 
131  public function additionalMetaData(): StringMap
132  {
134  }
135 }
setFilename(string $filename)
Overwrite the current filename.
Definition: Metadata.php:73
setMimeType(string $mimeType)
Overwrite the current mime type of the file.
Definition: Metadata.php:115
getMimeType()
Client supplied mime type of the uploaded.
Definition: Metadata.php:102
additionalMetaData()
Provides a string map implementation which allows the processors to store additional values...
Definition: Metadata.php:131
getFilename()
The filename supplied by the browser.
Definition: Metadata.php:60
getUploadSize()
This is always the original file size which was determined by the http service.
Definition: Metadata.php:90
__construct(string $filename, int $size, string $mimeType)
Metadata constructor.
Definition: Metadata.php:41
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Metadata.php:3