ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
StreamAccess.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\ResourceStorage\Consumer\StreamAccess
;
22
23
use
ILIAS\ResourceStorage\Revision\Revision
;
24
use
ILIAS\ResourceStorage\StorageHandler\StorageHandlerFactory
;
25
30
class
StreamAccess
31
{
32
public
const
PHP_MEMORY
=
'php://memory'
;
36
private
TokenFactory
$factory
;
37
private
StorageHandlerFactory
$storage_handler_factory
;
38
39
public
function
__construct
(
40
string
$storage_base_path,
41
StorageHandlerFactory
$storage_handler_factory
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
}
ILIAS\ResourceStorage\Consumer\StreamAccess\StreamAccess\populateRevision
populateRevision(Revision $revision)
Definition:
StreamAccess.php:47
ILIAS\ResourceStorage\Consumer\StreamAccess\TokenFactory
Definition:
TokenFactory.php:29
ILIAS\ResourceStorage\Consumer\StreamAccess
Definition:
Encrypt.php:21
ILIAS\ResourceStorage\Consumer\StreamAccess\StreamAccess\PHP_MEMORY
const PHP_MEMORY
Definition:
StreamAccess.php:32
ILIAS\ResourceStorage\Revision\Revision\withToken
withToken(Token $token)
Revision
ILIAS\ResourceStorage\Consumer\StreamAccess\StreamAccess\$factory
TokenFactory $factory
Definition:
StreamAccess.php:36
$token
$token
Definition:
xapitoken.php:70
ILIAS\ResourceStorage\Consumer\StreamAccess\StreamAccess
Definition:
StreamAccess.php:30
ILIAS\ResourceStorage\Consumer\StreamAccess\StreamAccess\__construct
__construct(string $storage_base_path, StorageHandlerFactory $storage_handler_factory)
Definition:
StreamAccess.php:39
ILIAS\ResourceStorage\Consumer\StreamAccess\StreamAccess\$storage_handler_factory
StorageHandlerFactory $storage_handler_factory
Definition:
StreamAccess.php:37
ILIAS\ResourceStorage\StorageHandler\StorageHandlerFactory
Class StorageHandlerFactory.
Definition:
StorageHandlerFactory.php:30
ILIAS\ResourceStorage\Revision\Revision
Class FileRevision.
Definition:
Revision.php:29
StorageHandlerFactory
src
ResourceStorage
Consumer
StreamAccess
StreamAccess.php
Generated on Sun Aug 31 2025 22:02:46 for ILIAS by
1.8.13 (using
Doxyfile
)