ILIAS  release_8 Revision v8.24
BaseConsumer.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
31abstract class BaseConsumer implements DeliveryConsumer
32{
33 use GetRevisionTrait;
34
35 protected ?int $revision_number = null;
36 protected string $file_name = '';
40
44 public function __construct(
48 ) {
49 $this->resource = $resource;
50 $this->stream_access = $stream_access;
51 $this->file_name_policy = $file_name_policy;
52 $this->file_name = $resource->getCurrentRevision()->getInformation()->getTitle();
53 }
54
55 abstract public function run(): void;
56
61 {
62 $this->revision_number = $revision_number;
63 return $this;
64 }
65
67 {
68 $this->file_name = $file_name;
69 return $this;
70 }
71}
setRevisionNumber(int $revision_number)
@inheritDoc
__construct(StorableResource $resource, StreamAccess $stream_access, FileNamePolicy $file_name_policy)
DownloadConsumer constructor.
run()
This runs the actual DeliveryConsumer.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...