ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
StreamAccess.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27
33{
34 public const PHP_MEMORY = 'php://memory';
35
36 public function __construct(string $storage_base_path, private StorageHandlerFactory $storage_handler_factory)
37 {
38 }
39
40 public function populateRevision(Revision $revision): Revision
41 {
42 $stream = $this->storage_handler_factory->getHandlerForRevision($revision)->getStream($revision);
43
44 return $revision->withStreamResolver(new StreamResolver($stream));
45 }
46
47 public function populateFlavour(
48 Flavour $flavour,
49 FileStream $file_stream,
50 int $index
51 ): Flavour {
52 return $flavour->withStreamResolver(
53 $index,
54 new StreamResolver($file_stream)
55 );
56 }
57}
populateFlavour(Flavour $flavour, FileStream $file_stream, int $index)
__construct(string $storage_base_path, private StorageHandlerFactory $storage_handler_factory)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
The base interface for all filesystem streams.
Definition: FileStream.php:32
withStreamResolver(?StreamResolver $stream_resolver=null)