ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\LegalDocuments\Consumer\ContainerURIConsumer Class Reference
+ Inheritance diagram for ILIAS\LegalDocuments\Consumer\ContainerURIConsumer:
+ Collaboration diagram for ILIAS\LegalDocuments\Consumer\ContainerURIConsumer:

Public Member Functions

 __construct (private SrcBuilder $src_builder, private StorableResource $resource, private StreamAccess $stream_access, private string $start_file, private float $valid_for_at_least_minutes=60.0)
 DownloadConsumer constructor. More...
 
 getURI ()
 

Protected Attributes

int $revision_number = null
 

Private Attributes

Archives $archives
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\Consumer\ContainerURIConsumer::__construct ( private SrcBuilder  $src_builder,
private StorableResource  $resource,
private StreamAccess  $stream_access,
private string  $start_file,
private float  $valid_for_at_least_minutes = 60.0 
)

DownloadConsumer constructor.

Definition at line 40 of file ContainerURIConsumer.php.

References $DIC.

46  {
47  global $DIC;
48  $this->archives = $DIC->archives();
49  }
global $DIC
Definition: shib_login.php:26

Member Function Documentation

◆ getURI()

ILIAS\LegalDocuments\Consumer\ContainerURIConsumer::getURI ( )

Definition at line 51 of file ContainerURIConsumer.php.

References $filename, null, and ILIAS\FileDelivery\Delivery\StreamDelivery\SUBREQUEST_SEPARATOR.

51  : ?URI
52  {
53  $filename = basename($this->start_file);
54  if ($filename === '') {
55  $filename = null;
56  }
57 
58  $startfile = urlencode($this->start_file); // e.g. for files with " " (spaces)
59  $startfile = str_replace(urlencode("/"), "/", $startfile); // we must keep directory sepparators
60 
61  $uri_string = $this->src_builder->getRevisionURL(
62  $this->stream_access->populateRevision($this->getRevision()),
63  true,
64  $this->valid_for_at_least_minutes,
65  $filename
66  ) . StreamDelivery::SUBREQUEST_SEPARATOR . $startfile;
67 
68  try {
69  return new URI($uri_string);
70  } catch (\Throwable) {
71  return null;
72  }
73  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$filename
Definition: buildRTE.php:78

Field Documentation

◆ $archives

Archives ILIAS\LegalDocuments\Consumer\ContainerURIConsumer::$archives
private

Definition at line 34 of file ContainerURIConsumer.php.

◆ $revision_number

int ILIAS\LegalDocuments\Consumer\ContainerURIConsumer::$revision_number = null
protected

Definition at line 35 of file ContainerURIConsumer.php.


The documentation for this class was generated from the following file: