ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
Factory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Elements
;
22
23
use
ILIAS\MetaData\Elements\Element
;
24
use
ILIAS\MetaData\Elements\Data\DataFactoryInterface
;
25
use
ILIAS\MetaData\Elements\NoID
;
26
use
ILIAS\MetaData\Structure\Definitions\DefinitionInterface
;
27
use
ILIAS\MetaData\Elements\RessourceID\RessourceIDInterface
;
28
use
ILIAS\MetaData\Vocabularies\Slots\Identifier
as
SlotIdentifier
;
29
30
class
Factory
31
{
32
protected
DataFactoryInterface
$data_factory
;
33
34
public
function
__construct
(
35
DataFactoryInterface
$data_factory
36
) {
37
$this->data_factory =
$data_factory
;
38
}
39
40
public
function
element
(
41
int
$md_id,
42
DefinitionInterface
$definition,
43
string
$data_value,
44
SlotIdentifier
$vocab_slot = SlotIdentifier::NULL,
45
Element
...$sub_elements
46
):
Element
{
47
return
new
Element
(
48
$md_id,
49
$definition,
50
$this->data_factory->data($definition->
dataType
(), $data_value, $vocab_slot),
51
...$sub_elements
52
);
53
}
54
55
public
function
root
(
56
DefinitionInterface
$definition,
57
Element
...$sub_elements
58
):
ElementInterface
{
59
return
new
Element
(
60
NoID::ROOT,
61
$definition,
62
$this->data_factory->null(),
63
...$sub_elements
64
);
65
}
66
67
public
function
set
(
68
RessourceIDInterface
$ressource_id,
69
ElementInterface
$root
70
):
SetInterface
{
71
return
new
Set
(
72
$ressource_id,
73
$root
74
);
75
}
76
}
ILIAS\MetaData\Structure\Definitions\DefinitionInterface
Definition:
DefinitionInterface.php:25
ILIAS\MetaData\Elements\Factory\root
root(DefinitionInterface $definition, Element ... $sub_elements)
Definition:
Factory.php:55
DataFactoryInterface
ILIAS\MetaData\Elements\Factory\element
element(int $md_id, DefinitionInterface $definition, string $data_value, SlotIdentifier $vocab_slot=SlotIdentifier::NULL, Element ... $sub_elements)
Definition:
Factory.php:40
ILIAS\MetaData\Elements\Element
Definition:
Element.php:34
RessourceIDInterface
ILIAS\MetaData\Elements\ElementInterface
Definition:
ElementInterface.php:28
ILIAS\MetaData\Elements\Set
Definition:
Set.php:26
ILIAS\MetaData\Elements\RessourceID\RessourceIDInterface
Definition:
RessourceIDInterface.php:23
ILIAS\MetaData\Elements\Factory\$data_factory
DataFactoryInterface $data_factory
Definition:
Factory.php:32
ILIAS\MetaData\Elements\SetInterface
Definition:
SetInterface.php:26
ILIAS\MetaData\Elements
Identifier
DefinitionInterface
ILIAS\MetaData\Structure\Definitions\DefinitionInterface\dataType
dataType()
Type of data this element can carry.
ILIAS\MetaData\Elements\Factory
Definition:
Factory.php:30
Element
ILIAS\MetaData\Elements\NoID
NoID
Definition:
NoID.php:23
ILIAS\MetaData\Elements\Data\DataFactoryInterface
Definition:
DataFactoryInterface.php:25
ILIAS\MetaData\Elements\Factory\__construct
__construct(DataFactoryInterface $data_factory)
Definition:
Factory.php:34
components
ILIAS
MetaData
classes
Elements
Factory.php
Generated on Sun Apr 13 2025 23:01:50 for ILIAS by
1.8.13 (using
Doxyfile
)