ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\MetaData\Elements\Factory Class Reference
+ Collaboration diagram for ILIAS\MetaData\Elements\Factory:

Public Member Functions

 __construct (DataFactoryInterface $data_factory)
 
 element (int $md_id, DefinitionInterface $definition, string $data_value, Element ... $sub_elements)
 
 root (DefinitionInterface $definition, Element ... $sub_elements)
 
 set (RessourceIDInterface $ressource_id, ElementInterface $root)
 

Protected Attributes

DataFactoryInterface $data_factory
 

Detailed Description

Definition at line 29 of file Factory.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MetaData\Elements\Factory::__construct ( DataFactoryInterface  $data_factory)

Definition at line 33 of file Factory.php.

References ILIAS\MetaData\Elements\Factory\$data_factory.

35  {
36  $this->data_factory = $data_factory;
37  }
DataFactoryInterface $data_factory
Definition: Factory.php:31

Member Function Documentation

◆ element()

ILIAS\MetaData\Elements\Factory::element ( int  $md_id,
DefinitionInterface  $definition,
string  $data_value,
Element ...  $sub_elements 
)

Definition at line 39 of file Factory.php.

References ILIAS\MetaData\Structure\Definitions\DefinitionInterface\dataType().

44  : Element {
45  return new Element(
46  $md_id,
47  $definition,
48  $this->data_factory->data($definition->dataType(), $data_value),
49  ...$sub_elements
50  );
51  }
+ Here is the call graph for this function:

◆ root()

ILIAS\MetaData\Elements\Factory::root ( DefinitionInterface  $definition,
Element ...  $sub_elements 
)

Definition at line 53 of file Factory.php.

56  : ElementInterface {
57  return new Element(
58  NoID::ROOT,
59  $definition,
60  $this->data_factory->null(),
61  ...$sub_elements
62  );
63  }

◆ set()

ILIAS\MetaData\Elements\Factory::set ( RessourceIDInterface  $ressource_id,
ElementInterface  $root 
)

Definition at line 65 of file Factory.php.

68  : SetInterface {
69  return new Set(
70  $ressource_id,
71  $root
72  );
73  }

Field Documentation

◆ $data_factory

DataFactoryInterface ILIAS\MetaData\Elements\Factory::$data_factory
protected

Definition at line 31 of file Factory.php.

Referenced by ILIAS\MetaData\Elements\Factory\__construct().


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