ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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;
35 
39  public function __construct(private SrcBuilder $src_builder, private StorableResource $resource, private StreamAccess $stream_access)
40  {
41  }
42 
43  public function getSrc(bool $signed = false): string
44  {
45  try {
46  return $this->src_builder->getRevisionURL(
47  $this->stream_access->populateRevision($this->getRevision()),
48  $signed,
49  60,
50  null
51  );
52  } catch (\Throwable) {
53  return '';
54  }
55 
56  }
57 
61  public function setRevisionNumber(int $revision_number): self
62  {
63  $this->revision_number = $revision_number;
64  return $this;
65  }
66 }
__construct(private SrcBuilder $src_builder, private StorableResource $resource, private StreamAccess $stream_access)
DownloadConsumer constructor.
Definition: SrcConsumer.php:39
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null