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