ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ContainerZIPAccessConsumer.php
Go to the documentation of this file.
1<?php
2
20
26
31{
32 use GetRevisionTrait;
33
35 protected ?int $revision_number = null;
36
40 public function __construct(private StorableResource $resource, private StreamAccess $stream_access)
41 {
42 global $DIC;
43 $this->archives = $DIC->archives();
44 }
45
46 public function getZIP(?UnzipOptions $unzip_options = null): Unzip
47 {
48 $revision = $this->getRevision();
49 $revision = $this->stream_access->populateRevision($revision);
50 $zip_stream = $revision->maybeStreamResolver()?->getStream();
51
52 return $this->archives->unzip($zip_stream, $unzip_options);
53 }
54}
__construct(private StorableResource $resource, private StreamAccess $stream_access)
DownloadConsumer constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26