ILIAS  release_7 Revision v7.30-3-g800a261c036
Consumers.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
7
14{
15
24
30 public function __construct(
33 ) {
34 $this->consumer_factory = $cf;
35 $this->resource_builder = $r;
36 }
37
38 public function download(ResourceIdentification $identification) : DownloadConsumer
39 {
40 return $this->consumer_factory->download($this->resource_builder->get($identification));
41 }
42
43 public function inline(ResourceIdentification $identification) : InlineConsumer
44 {
45 return $this->consumer_factory->inline($this->resource_builder->get($identification));
46 }
47
48 public function stream(ResourceIdentification $identification) : FileStreamConsumer
49 {
50 return $this->consumer_factory->fileStream($this->resource_builder->get($identification));
51 }
52
53 public function src(ResourceIdentification $identification) : SrcConsumer
54 {
55 return $this->consumer_factory->src($this->resource_builder->get($identification));
56 }
57}
An exception for terminatinating execution or to throw for unit testing.
__construct(ConsumerFactory $cf, ResourceBuilder $r)
Consumers constructor.
Definition: Consumers.php:30
src(ResourceIdentification $identification)
Definition: Consumers.php:53
stream(ResourceIdentification $identification)
Definition: Consumers.php:48
download(ResourceIdentification $identification)
Definition: Consumers.php:38