ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 = '';
37
41 public function __construct(
42 protected StorableResource $resource,
43 protected StreamAccess $stream_access,
44 protected FileNamePolicy $file_name_policy
45 ) {
46 $this->file_name = $this->resource->getCurrentRevision()->getInformation()->getTitle();
47 }
48
49 abstract public function run(): void;
50
55 {
56 $this->revision_number = $revision_number;
57 return $this;
58 }
59
61 {
62 $this->file_name = $file_name;
63 return $this;
64 }
65}
__construct(protected StorableResource $resource, protected StreamAccess $stream_access, protected FileNamePolicy $file_name_policy)
DownloadConsumer constructor.
setRevisionNumber(int $revision_number)
@inheritDoc
run()
This runs the actual DeliveryConsumer.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...