ILIAS  release_8 Revision v8.24
StreamAccess.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
31{
32 public const PHP_MEMORY = 'php://memory';
38
39 public function __construct(
40 string $storage_base_path,
42 ) {
43 $this->storage_handler_factory = $storage_handler_factory;
44 $this->factory = new TokenFactory($storage_base_path);
45 }
46
47 public function populateRevision(Revision $revision): Revision
48 {
49 $stream = $this->storage_handler_factory->getHandlerForRevision($revision)->getStream($revision);
50 $token = $this->factory->lease($stream);
51
52 return $revision->withToken($token);
53 }
54}
__construct(string $storage_base_path, StorageHandlerFactory $storage_handler_factory)
$token
Definition: xapitoken.php:70