ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
StreamReplacementRevision.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
32 {
33  protected bool $available = true;
34  protected \ILIAS\ResourceStorage\Identification\ResourceIdentification $identification;
35  protected int $version_number = 0;
37  protected int $owner_id = 0;
38  protected string $title = '';
40 
44  public function __construct(ResourceIdentification $identification, FileStream $new_stream)
45  {
46  $this->file_stream = $new_stream;
47  parent::__construct($identification);
48  }
49 
50  public function getReplacementStream(): FileStream
51  {
52  return $this->file_stream;
53  }
54 
55  public function setVersionNumber(int $version_number): void
56  {
57  $this->version_number = $version_number;
58  }
59 
60  public function getVersionNumber(): int
61  {
62  return $this->version_number;
63  }
64 
68  public function getInformation(): Information
69  {
70  return $this->information ?? new FileInformation();
71  }
72 
73  public function setInformation(Information $information): void
74  {
75  $this->information = $information;
76  }
77 
81  public function setUnavailable(): void
82  {
83  $this->available = false;
84  }
85 
89  public function isAvailable(): bool
90  {
91  return $this->available;
92  }
93 
94  public function getOwnerId(): int
95  {
96  return $this->owner_id;
97  }
98 
99  public function setOwnerId(int $owner_id): self
100  {
101  $this->owner_id = $owner_id;
102  return $this;
103  }
104 
108  public function setTitle(string $title): Revision
109  {
110  $this->title = $title;
111  return $this;
112  }
113 
114  public function getTitle(): string
115  {
116  return $this->title;
117  }
118 }
__construct(ResourceIdentification $identification, FileStream $new_stream)
Revision constructor.
ILIAS ResourceStorage Identification ResourceIdentification $identification
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS ResourceStorage Information Information $information
__construct(Container $dic, ilPlugin $plugin)
The base interface for all filesystem streams.
Definition: FileStream.php:31