ILIAS  release_7 Revision v7.30-3-g800a261c036
FileInformation.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
5use DateTimeImmutable;
6
12{
13
17 protected $title = '';
21 protected $suffix = '';
25 protected $mime_type = '';
29 protected $size = 0;
33 protected $creation_date;
34
38 public function getTitle() : string
39 {
40 return $this->title;
41 }
42
47 public function setTitle(string $title) : Information
48 {
49 $this->title = $title;
50
51 return $this;
52 }
53
57 public function getSuffix() : string
58 {
59 return $this->suffix;
60 }
61
66 public function setSuffix(string $suffix) : Information
67 {
68 $this->suffix = $suffix;
69
70 return $this;
71 }
72
76 public function getMimeType() : string
77 {
78 return $this->mime_type;
79 }
80
85 public function setMimeType(string $mime_type) : FileInformation
86 {
87 $this->mime_type = $mime_type;
88
89 return $this;
90 }
91
95 public function getSize() : int
96 {
97 return $this->size;
98 }
99
104 public function setSize(int $size) : FileInformation
105 {
106 $this->size = $size;
107
108 return $this;
109 }
110
114 public function getCreationDate() : DateTimeImmutable
115 {
116 return $this->creation_date ?? new DateTimeImmutable();
117 }
118
122 public function setCreationDate(DateTimeImmutable $creation_date) : void
123 {
124 $this->creation_date = $creation_date;
125 }
126}
An exception for terminatinating execution or to throw for unit testing.
setCreationDate(DateTimeImmutable $creation_date)