ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
LOMDictionary.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\XML\Dictionary
;
22
23
use
ILIAS\MetaData\Elements\Base\BaseElementInterface
;
24
use
ILIAS\MetaData\Structure\Dictionaries\Dictionary
as BaseDictionary;
25
26
use
ILIAS\MetaData\XML\Version
;
27
28
use
function
PHPUnit\Framework\throwException
;
29
30
class
LOMDictionary
extends
BaseDictionary implements
DictionaryInterface
31
{
32
public
function
tagForElement
(
33
BaseElementInterface
$element,
34
Version
$version
35
): ?
TagInterface
{
36
foreach
(parent::tagsForElement($element) as $tag) {
37
if
(!($tag instanceof
TagInterface
)) {
38
throw
new \ilMDXMLException(
'Invalid dictionary'
);
39
}
40
if
($tag->version() ===
$version
) {
41
return
$tag;
42
}
43
}
44
return
null
;
45
}
46
}
$version
$version
Definition:
plugin.php:24
ILIAS\MetaData\XML\Dictionary\DictionaryInterface
Definition:
DictionaryInterface.php:26
ILIAS\MetaData\XML\Dictionary
Definition:
DictionaryInterface.php:21
throwException
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
ILIAS\MetaData\XML\Dictionary\LOMDictionary
Definition:
LOMDictionary.php:30
ILIAS\MetaData\XML\Version
Version
Definition:
Version.php:23
ILIAS\MetaData\XML\Dictionary\LOMDictionary\tagForElement
tagForElement(BaseElementInterface $element, Version $version)
Definition:
LOMDictionary.php:32
BaseElementInterface
ILIAS\MetaData\Elements\Base\BaseElementInterface
Definition:
BaseElementInterface.php:27
ILIAS\MetaData\Structure\Dictionaries\Dictionary
Definition:
Dictionary.php:32
ILIAS\MetaData\XML\Dictionary\TagInterface
Definition:
TagInterface.php:26
components
ILIAS
MetaData
classes
XML
Dictionary
LOMDictionary.php
Generated on Wed Sep 3 2025 23:03:27 for ILIAS by
1.8.13 (using
Doxyfile
)