ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
DummyMachine.php
Go to the documentation of this file.
1 <?php
2 
20 
29 
34 {
35  private string $depends_on_engine = NoEngine::class;
36  private string $id = self::class;
37  private ?string $can_handle_definition_id = null;
38 
39  public function load(
40  string $id,
41  string $can_handle_definition_id = null,
42  string $depends_on_engine = NoEngine::class
43  ): void {
44  $this->id = $id;
45  $this->depends_on_engine = $depends_on_engine;
46  $this->can_handle_definition_id = $can_handle_definition_id;
47  }
48 
49  public function __construct()
50  {
51  }
52 
53  public function getId(): string
54  {
55  return $this->id;
56  }
57 
58  public function canHandleDefinition(FlavourDefinition $definition): bool
59  {
60  if ($this->can_handle_definition_id === null) {
61  return true;
62  }
63  return $this->can_handle_definition_id === $definition->getId();
64  }
65 
66  public function dependsOnEngine(): ?string
67  {
69  }
70 
71 
72  public function processStream(
73  FileInformation $information,
74  FileStream $stream,
75  FlavourDefinition $for_definition
76  ): \Generator {
77  yield new NonStoreableResult($for_definition, $stream);
78  }
79 }
load(string $id, string $can_handle_definition_id=null, string $depends_on_engine=NoEngine::class)
dependsOnEngine()
Return the class name of the Engine that is required for this Machine to work.
__construct()
FlavourMachines must be able to be created without further dependencies.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
canHandleDefinition(FlavourDefinition $definition)
Check if a corresponding configuration can be processed by this Machine.
processStream(FileInformation $information, FileStream $stream, FlavourDefinition $for_definition)
The base interface for all filesystem streams.
Definition: FileStream.php:31