ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
NullMachine.php
Go to the documentation of this file.
1<?php
2
20
27
32{
33 private string $reason = '';
34
35
36 public function getId(): string
37 {
38 return 'null_machine';
39 }
40
41 public function canHandleDefinition(FlavourDefinition $definition): bool
42 {
43 return true;
44 }
45
46 public function dependsOnEngine(): ?string
47 {
48 return NoEngine::class;
49 }
50
51 public function withReason(string $reason): FlavourMachine
52 {
53 $clone = clone $this;
54 $clone->reason = $reason;
55 return $clone;
56 }
57
58 public function getReason(): string
59 {
60 return $this->reason;
61 }
62
63
64 public function processStream(
65 FileInformation $information,
66 FileStream $stream,
67 FlavourDefinition $for_definition
68 ): \Generator {
69 yield new NonStoreableResult(
70 $for_definition,
71 Streams::ofString('empty')
72 );
73 }
74}
Stream factory which enables the user to create streams without the knowledge of the concrete class.
Definition: Streams.php:32
processStream(FileInformation $information, FileStream $stream, FlavourDefinition $for_definition)
Definition: NullMachine.php:64
dependsOnEngine()
Return the class name of the Engine that is required for this Machine to work.
Definition: NullMachine.php:46
canHandleDefinition(FlavourDefinition $definition)
Check if a corresponding configuration can be processed by this Machine.
Definition: NullMachine.php:41
The base interface for all filesystem streams.
Definition: FileStream.php:32
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...