ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ContainerZIPAccessConsumer.php
Go to the documentation of this file.
1 <?php
2 
20 
27 
32 {
33  use GetRevisionTrait;
34 
35  private \ILIAS\Filesystem\Util\Archive\Archives $archives;
36  protected ?int $revision_number = null;
39 
43  public function __construct(StorableContainerResource $resource, StreamAccess $stream_access)
44  {
45  global $DIC;
46  $this->resource = $resource;
47  $this->archives = $DIC->archives();
48  $this->stream_access = $stream_access;
49  }
50 
51  public function getZIP(UnzipOptions $unzip_options = null): Unzip
52  {
53  $revision = $this->getRevision();
54  $revision = $this->stream_access->populateRevision($revision);
55  $zip_stream = $revision->maybeStreamResolver()?->getStream();
56 
57  return $this->archives->unzip($zip_stream, $unzip_options);
58  }
59 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(StorableContainerResource $resource, 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: feed.php:28