ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ContainerZIPAccessConsumer.php
Go to the documentation of this file.
1 <?php
2 
20 
26 
31 {
32  use GetRevisionTrait;
33 
34  private Archives $archives;
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 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
__construct(private StorableResource $resource, private StreamAccess $stream_access)
DownloadConsumer constructor.