ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\MetaData\Vocabularies\Dispatch\Reader Class Reference
+ Inheritance diagram for ILIAS\MetaData\Vocabularies\Dispatch\Reader:
+ Collaboration diagram for ILIAS\MetaData\Vocabularies\Dispatch\Reader:

Public Member Functions

 __construct (CopyrightBridge $copyright_bridge, ControlledRepo $controlled_repo, StandardRepo $standard_repo)
 
 vocabulary (string $vocab_id)
 
 vocabulariesForSlots (SlotIdentifier ... $slots)
 
 activeVocabulariesForSlots (SlotIdentifier ... $slots)
 

Protected Attributes

CopyrightBridge $copyright_bridge
 
ControlledRepo $controlled_repo
 
StandardRepo $standard_repo
 

Detailed Description

Definition at line 30 of file Reader.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MetaData\Vocabularies\Dispatch\Reader::__construct ( CopyrightBridge  $copyright_bridge,
ControlledRepo  $controlled_repo,
StandardRepo  $standard_repo 
)

Member Function Documentation

◆ activeVocabulariesForSlots()

ILIAS\MetaData\Vocabularies\Dispatch\Reader::activeVocabulariesForSlots ( SlotIdentifier ...  $slots)
Returns
VocabularyInterface[]

Implements ILIAS\MetaData\Vocabularies\Dispatch\ReaderInterface.

Definition at line 80 of file Reader.php.

References ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from().

82  : \Generator {
83  foreach ($slots as $slot) {
84  $from_copyright = $this->copyright_bridge->vocabulary($slot);
85  if (!is_null($from_copyright) && $from_copyright->isActive()) {
86  yield $from_copyright;
87  }
88  }
89  yield from $this->controlled_repo->getActiveVocabulariesForSlots(...$slots);
90  yield from $this->standard_repo->getActiveVocabularies(...$slots);
91  }
+ Here is the call graph for this function:

◆ vocabulariesForSlots()

ILIAS\MetaData\Vocabularies\Dispatch\Reader::vocabulariesForSlots ( SlotIdentifier ...  $slots)
Returns
VocabularyInterface[]

Implements ILIAS\MetaData\Vocabularies\Dispatch\ReaderInterface.

Definition at line 64 of file Reader.php.

References ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from().

66  : \Generator {
67  foreach ($slots as $slot) {
68  $from_copyright = $this->copyright_bridge->vocabulary($slot);
69  if (!is_null($from_copyright)) {
70  yield $from_copyright;
71  }
72  }
73  yield from $this->controlled_repo->getVocabulariesForSlots(...$slots);
74  yield from $this->standard_repo->getVocabularies(...$slots);
75  }
+ Here is the call graph for this function:

◆ vocabulary()

ILIAS\MetaData\Vocabularies\Dispatch\Reader::vocabulary ( string  $vocab_id)

Implements ILIAS\MetaData\Vocabularies\Dispatch\ReaderInterface.

Definition at line 46 of file Reader.php.

References null.

46  : VocabularyInterface
47  {
48  $slot = SlotIdentifier::tryFrom($vocab_id);
49  if ($slot === null) {
50  return $this->controlled_repo->getVocabulary($vocab_id);
51  }
52 
53  $from_copyright = $this->copyright_bridge->vocabulary($slot);
54  if ($from_copyright !== null) {
55  return $from_copyright;
56  }
57 
58  return $this->standard_repo->getVocabulary($slot);
59  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

Field Documentation

◆ $controlled_repo

ControlledRepo ILIAS\MetaData\Vocabularies\Dispatch\Reader::$controlled_repo
protected

Definition at line 33 of file Reader.php.

Referenced by ILIAS\MetaData\Vocabularies\Dispatch\Reader\__construct().

◆ $copyright_bridge

CopyrightBridge ILIAS\MetaData\Vocabularies\Dispatch\Reader::$copyright_bridge
protected

Definition at line 32 of file Reader.php.

Referenced by ILIAS\MetaData\Vocabularies\Dispatch\Reader\__construct().

◆ $standard_repo

StandardRepo ILIAS\MetaData\Vocabularies\Dispatch\Reader::$standard_repo
protected

Definition at line 34 of file Reader.php.

Referenced by ILIAS\MetaData\Vocabularies\Dispatch\Reader\__construct().


The documentation for this class was generated from the following file: