ILIAS
trunk Revision v11.0_alpha-2658-ge2404539063
◀ ilDoc Overview
ScaffoldFactory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Elements\Scaffolds
;
22
23
use
ILIAS\MetaData\Structure\Definitions\DefinitionInterface
;
24
use
ILIAS\MetaData\Elements\Element
;
25
use
ILIAS\MetaData\Elements\Data\DataFactoryInterface
;
26
use
ILIAS\MetaData\Elements\NoID
;
27
use
ILIAS\MetaData\Elements\ElementInterface
;
28
use
ILIAS\MetaData\Elements\SetInterface
;
29
use
ILIAS\MetaData\Elements\Set
;
30
use
ILIAS\MetaData\Elements\RessourceID\NullRessourceID
;
31
use
ILIAS\MetaData\Elements\RessourceID\RessourceIDFactoryInterface
;
32
33
class
ScaffoldFactory
implements
ScaffoldFactoryInterface
34
{
35
protected
DataFactoryInterface
$data_factory
;
36
protected
RessourceIDFactoryInterface
$ressource_id_factory
;
37
38
public
function
__construct
(
39
DataFactoryInterface
$data_factory,
40
RessourceIDFactoryInterface
$ressource_id_factory
41
) {
42
$this->data_factory =
$data_factory
;
43
$this->ressource_id_factory =
$ressource_id_factory
;
44
}
45
46
public
function
scaffold
(
DefinitionInterface
$definition):
ElementInterface
47
{
48
return
new
Element
(
49
NoID::SCAFFOLD,
50
$definition,
51
$this->data_factory->null()
52
);
53
}
54
55
public
function
set
(
DefinitionInterface
$root_definition):
SetInterface
56
{
57
return
new
Set
(
58
$this->ressource_id_factory->null(),
59
new
Element
(
60
NoID::ROOT,
61
$root_definition,
62
$this->data_factory->null()
63
)
64
);
65
}
66
}
ILIAS\MetaData\Structure\Definitions\DefinitionInterface
Definition:
DefinitionInterface.php:25
DataFactoryInterface
RessourceIDFactoryInterface
ILIAS\MetaData\Elements\Element
Definition:
Element.php:34
Set
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactory
Definition:
ScaffoldFactory.php:33
ILIAS\MetaData\Elements\ElementInterface
Definition:
ElementInterface.php:28
ILIAS\MetaData\Elements\Set
Definition:
Set.php:26
SetInterface
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactoryInterface
Definition:
ScaffoldFactoryInterface.php:27
ILIAS\MetaData\Elements\SetInterface
Definition:
SetInterface.php:26
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactory\$ressource_id_factory
RessourceIDFactoryInterface $ressource_id_factory
Definition:
ScaffoldFactory.php:36
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactory\$data_factory
DataFactoryInterface $data_factory
Definition:
ScaffoldFactory.php:35
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactory\scaffold
scaffold(DefinitionInterface $definition)
Definition:
ScaffoldFactory.php:46
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactory\__construct
__construct(DataFactoryInterface $data_factory, RessourceIDFactoryInterface $ressource_id_factory)
Definition:
ScaffoldFactory.php:38
ElementInterface
DefinitionInterface
ILIAS\MetaData\Elements\RessourceID\RessourceIDFactoryInterface
Definition:
RessourceIDFactoryInterface.php:23
ILIAS\MetaData\Elements\Scaffolds
Definition:
NullScaffoldFactory.php:21
Element
NullRessourceID
ILIAS\MetaData\Elements\NoID
NoID
Definition:
NoID.php:23
ILIAS\MetaData\Elements\Data\DataFactoryInterface
Definition:
DataFactoryInterface.php:25
components
ILIAS
MetaData
classes
Elements
Scaffolds
ScaffoldFactory.php
Generated on Tue Sep 2 2025 23:03:29 for ILIAS by
1.8.13 (using
Doxyfile
)