ILIAS  release_8 Revision v8.24
ClonedRevisionInfoResolver.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use DateTimeImmutable;
25
32{
33 protected \ILIAS\ResourceStorage\Information\Information $info;
34 protected int $next_version_number;
36
41 {
42 $this->next_version_number = $next_version_number;
43 $this->existing_revision = $existing_revision;
44 $this->info = $existing_revision->getInformation();
45 }
46
47 public function getNextVersionNumber(): int
48 {
50 }
51
52 public function getOwnerId(): int
53 {
54 return $this->existing_revision->getOwnerId();
55 }
56
57 public function getRevisionTitle(): string
58 {
59 return $this->existing_revision->getTitle();
60 }
61
62 public function getFileName(): string
63 {
64 return $this->info->getTitle();
65 }
66
67 public function getMimeType(): string
68 {
69 return $this->info->getMimeType();
70 }
71
72 public function getSuffix(): string
73 {
74 return $this->info->getSuffix();
75 }
76
77 public function getCreationDate(): DateTimeImmutable
78 {
79 return new DateTimeImmutable();
80 }
81
82 public function getSize(): int
83 {
84 return $this->info->getSize();
85 }
86}
__construct(int $next_version_number, FileRevision $existing_revision)
ClonedRevisionInfoResolver constructor.