ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\ResourceStorage\Consumer\ContainerURIConsumer Class Reference
+ Inheritance diagram for ILIAS\ResourceStorage\Consumer\ContainerURIConsumer:
+ Collaboration diagram for ILIAS\ResourceStorage\Consumer\ContainerURIConsumer:

Public Member Functions

 __construct (private SrcBuilder $src_builder, StorableContainerResource $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
 
StorableResource $resource
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

DownloadConsumer constructor.

Definition at line 42 of file ContainerURIConsumer.php.

References $DIC, and ILIAS\ResourceStorage\Consumer\ContainerURIConsumer\$resource.

48  {
49  global $DIC;
50  $this->resource = $resource;
51  $this->archives = $DIC->archives();
52  }
global $DIC
Definition: feed.php:28

Member Function Documentation

◆ getURI()

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

Definition at line 54 of file ContainerURIConsumer.php.

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

54  : ?URI
55  {
56  $filename = basename($this->start_file);
57  if ($filename === '') {
58  $filename = null;
59  }
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 . urlencode($this->start_file);
67 
68  try {
69  return new URI($uri_string);
70  } catch (\Throwable) {
71  return null;
72  }
73  }
$filename
Definition: buildRTE.php:78

Field Documentation

◆ $archives

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

Definition at line 35 of file ContainerURIConsumer.php.

◆ $resource

StorableResource ILIAS\ResourceStorage\Consumer\ContainerURIConsumer::$resource
private

◆ $revision_number

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

Definition at line 36 of file ContainerURIConsumer.php.


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