ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
NullAdapter.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
27 class NullAdapter implements AdapterInterface
28 {
29  public function findElementOfCondition(
30  SlotIdentifier $slot,
31  ElementInterface $element,
32  ElementInterface ...$all_elements
33  ): ?ElementInterface {
34  return null;
35  }
36 
37  public function slotForElement(ElementInterface $element): SlotIdentifier
38  {
39  return SlotIdentifier::NULL;
40  }
41 
46  {
47  yield from [];
48  }
49 
51  ElementInterface $element,
52  ElementInterface $element_in_condition,
53  string $value
54  ): SlotIdentifier {
55  return SlotIdentifier::NULL;
56  }
57 
58  public function doesSlotHaveVocabularies(
59  SlotIdentifier $slot
60  ): bool {
61  return false;
62  }
63 
64  public function doesSlotAllowCustomInput(
65  SlotIdentifier $slot,
66  ): bool {
67  return false;
68  }
69 
71  SlotIdentifier $slot,
72  string $value
73  ): bool {
74  return false;
75  }
76 
80  public function valuesInVocabulariesForSlot(
81  SlotIdentifier $slot,
82  ?string $add_if_not_included = null
83  ): \Generator {
84  yield from [];
85  }
86 
87  public function sourceMapForSlot(SlotIdentifier $slot): \Closure
88  {
89  return function () {};
90  }
91 }
sourceMapForSlot(SlotIdentifier $slot)
Returned closure takes a string value as argument, and returns the source of the vocabulary it&#39;s from...
Definition: NullAdapter.php:87
doesSlotHaveVocabularies(SlotIdentifier $slot)
Definition: NullAdapter.php:58
slotsForElementWithoutCondition(ElementInterface $element)
Definition: NullAdapter.php:45
potentialSlotForElementByCondition(ElementInterface $element, ElementInterface $element_in_condition, string $value)
Definition: NullAdapter.php:50
findElementOfCondition(SlotIdentifier $slot, ElementInterface $element, ElementInterface ... $all_elements)
Definition: NullAdapter.php:29
slotForElement(ElementInterface $element)
Definition: NullAdapter.php:37
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
isValueInVocabulariesForSlot(SlotIdentifier $slot, string $value)
Definition: NullAdapter.php:70
valuesInVocabulariesForSlot(SlotIdentifier $slot, ?string $add_if_not_included=null)
Definition: NullAdapter.php:80
doesSlotAllowCustomInput(SlotIdentifier $slot,)
Definition: NullAdapter.php:64