ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
BaseRevision.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
32 abstract class BaseRevision implements Revision
33 {
34  private ?string $storage_id = null;
37 
38  protected RevisionStatus $status = RevisionStatus::PUBLISHED;
39 
43  public function __construct(ResourceIdentification $identification)
44  {
45  $this->identification = $identification;
46  }
47 
52  {
53  return $this->identification;
54  }
55 
56  public function setStorageID(string $storage_id): void
57  {
58  $this->storage_id = $storage_id;
59  }
60 
61  public function getStorageID(): string
62  {
63  return $this->storage_id ?? '';
64  }
65 
66 
67  public function withStreamResolver(?StreamResolver $stream_resolver = null): Revision
68  {
69  $clone = clone $this;
70  $clone->stream_resolver = $stream_resolver;
71  return $clone;
72  }
73 
74  public function maybeStreamResolver(): ?StreamResolver
75  {
77  }
78 
79  public function getStatus(): RevisionStatus
80  {
81  return $this->status;
82  }
83 
84  public function setStatus(RevisionStatus $status): void
85  {
86  $this->status = $status;
87  }
88 }
__construct(ResourceIdentification $identification)
NullRevision constructor.
Token
The string representation of these tokens must not occur in the names of metadata elements...
Definition: Token.php:27
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
withStreamResolver(?StreamResolver $stream_resolver=null)