ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
GetRevisionTrait.php
Go to the documentation of this file.
1
<?php
2
3
namespace
ILIAS\ResourceStorage\Consumer
;
4
5
use
ILIAS\ResourceStorage\Revision\Revision
;
6
use
OutOfBoundsException
;
7
12
trait
GetRevisionTrait
13
{
18
protected
function
getRevision() : Revision
19
{
20
if
($this->revision_number !== null) {
21
if
($this->resource->hasSpecificRevision($this->revision_number)) {
22
$revision = $this->resource->getSpecificRevision($this->revision_number);
23
}
else
{
24
throw
new
OutOfBoundsException
(
"there is no version $this->revision_number of resource {$this->resource->getIdentification()->serialize()}"
);
25
}
26
}
else
{
27
$revision = $this->resource->getCurrentRevision();
28
}
29
return
$revision;
30
}
31
32
}
GetRevisionTrait
ILIAS\ResourceStorage\Consumer
Definition:
AbsolutePathConsumer.php:3
Revision
OutOfBoundsException
src
ResourceStorage
Consumer
GetRevisionTrait.php
Generated on Tue Sep 2 2025 21:01:44 for ILIAS by
1.8.13 (using
Doxyfile
)