ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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, 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\ResourceStorage\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.

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

References $DIC.

Member Function Documentation

◆ getURI()

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

Definition at line 51 of file ContainerURIConsumer.php.

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,
67
68 try {
69 return new URI($uri_string);
70 } catch (\Throwable) {
71 return null;
72 }
73 }
$filename
Definition: buildRTE.php:78

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

Field Documentation

◆ $archives

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

Definition at line 34 of file ContainerURIConsumer.php.

◆ $revision_number

int ILIAS\ResourceStorage\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: