ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
FileInformation.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use DateTimeImmutable;
24
30{
31 protected string $title = '';
32 protected string $suffix = '';
33 protected string $mime_type = '';
34 protected int $size = 0;
35 protected ?\DateTimeImmutable $creation_date = null;
36
37 public function getTitle(): string
38 {
39 return $this->title;
40 }
41
42 public function setTitle(string $title): self
43 {
44 $this->title = $title;
45
46 return $this;
47 }
48
49 public function getSuffix(): string
50 {
51 return trim($this->suffix); // FIX to ensure no leading/trailing spaces
52 }
53
54 public function setSuffix(string $suffix): self
55 {
56 $this->suffix = $suffix;
57
58 return $this;
59 }
60
61 public function getMimeType(): string
62 {
63 return $this->mime_type;
64 }
65
66 public function setMimeType(string $mime_type): self
67 {
68 $this->mime_type = $mime_type;
69
70 return $this;
71 }
72
73 public function getSize(): int
74 {
75 return $this->size;
76 }
77
78 public function setSize(int $size): self
79 {
80 $this->size = $size;
81
82 return $this;
83 }
84
85 public function getCreationDate(): DateTimeImmutable
86 {
87 return $this->creation_date ?? new DateTimeImmutable();
88 }
89
90 public function setCreationDate(DateTimeImmutable $creation_date): self
91 {
92 $this->creation_date = $creation_date;
93
94 return $this;
95 }
96}
setCreationDate(DateTimeImmutable $creation_date)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...