ILIAS  release_8 Revision v8.24
InlineSrcBuilder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
30{
31 public function getRevisionURL(
32 Revision $revision,
33 bool $signed = true
34 ): string {
35 if ($signed) {
36 throw new \RuntimeException('InlineSrcBuilder does not support signed URLs');
37 }
38 $token = $revision->maybeGetToken();
39 if ($token !== null) {
40 $stream = $token->resolveStream();
41 $base64 = base64_encode((string)$stream);
42 $mime = $stream->getMimeType();
43
44 return "data:$mime;base64,$base64";
45 }
46 return '';
47 }
48}
getRevisionURL(Revision $revision, bool $signed=true)
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$token
Definition: xapitoken.php:70