ILIAS  release_8 Revision v8.23
SrcConsumer.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
25 
31 {
32  use GetRevisionTrait;
33 
34  protected ?int $revision_number = null;
38 
42  public function __construct(SrcBuilder $src_builder, StorableResource $resource, StreamAccess $stream_access)
43  {
44  $this->src_builder = $src_builder;
45  $this->resource = $resource;
46  $this->stream_access = $stream_access;
47  }
48 
49  public function getSrc(bool $signed = false): string
50  {
51  return $this->src_builder->getRevisionURL(
52  $this->stream_access->populateRevision($this->getRevision()),
53  $signed
54  );
55  }
56 
60  public function setRevisionNumber(int $revision_number): self
61  {
62  $this->revision_number = $revision_number;
63  return $this;
64  }
65 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(SrcBuilder $src_builder, StorableResource $resource, StreamAccess $stream_access)
DownloadConsumer constructor.
Definition: SrcConsumer.php:42