1<?
php declare(strict_types=1);
42 $revision = $this->getRevision();
44 $stream = $this->storage_handler->getStream($revision);
45 }
catch (\Throwable $t) {
49 $base64 = base64_encode($stream->getContents());
50 $mime = $revision->getInformation()->getMimeType();
52 return "data:{$mime};base64,{$base64}";
An exception for terminatinating execution or to throw for unit testing.
setRevisionNumber(int $revision_number)
@inheritDoc
__construct(StorableResource $resource, StorageHandler $storage_handler)
DownloadConsumer constructor.
Interface StorageResource.
Class FileResourceHandler.