ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ConsumerFactory.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
7
14{
15
20
21
28 {
29 $this->storage_handler_factory = $storage_handler_factory;
30 }
31
32
38 public function download(StorableResource $resource) : DownloadConsumer
39 {
40 return new DownloadConsumer($resource, $this->storage_handler_factory->getHandlerForResource($resource));
41 }
42
43
49 public function inline(StorableResource $resource) : InlineConsumer
50 {
51 return new InlineConsumer($resource, $this->storage_handler_factory->getHandlerForResource($resource));
52 }
53
54
60 public function fileStream(StorableResource $resource) : FileStreamConsumer
61 {
62 return new FileStreamConsumer($resource, $this->storage_handler_factory->getHandlerForResource($resource));
63 }
64}
An exception for terminatinating execution or to throw for unit testing.
__construct(StorageHandlerFactory $storage_handler_factory)
ConsumerFactory constructor.