ILIAS  release_7 Revision v7.30-3-g800a261c036
ClonedRevisionInfoResolver.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
5use DateTimeImmutable;
7
14{
26 protected $info;
27
34 {
35 $this->next_version_number = $next_version_number;
36 $this->existing_revision = $existing_revision;
37 $this->info = $existing_revision->getInformation();
38 }
39
40 public function getNextVersionNumber() : int
41 {
43 }
44
45 public function getOwnerId() : int
46 {
47 return $this->existing_revision->getOwnerId() ?? 6;
48 }
49
50 public function getRevisionTitle() : string
51 {
52 return $this->existing_revision->getTitle();
53 }
54
55 public function getFileName() : string
56 {
57 return $this->info->getTitle();
58 }
59
60 public function getMimeType() : string
61 {
62 return $this->info->getMimeType();
63 }
64
65 public function getSuffix() : string
66 {
67 return $this->info->getSuffix();
68 }
69
70 public function getCreationDate() : DateTimeImmutable
71 {
72 return new DateTimeImmutable();
73 }
74
75 public function getSize() : int
76 {
77 return $this->info->getSize();
78 }
79
80}
An exception for terminatinating execution or to throw for unit testing.
__construct(int $next_version_number, FileRevision $existing_revision)
ClonedRevisionInfoResolver constructor.
info()
Definition: info.php:2