ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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, SlotIdentifier $vocab_slot=SlotIdentifier::NULL, 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 30 of file Factory.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 34 of file Factory.php.

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

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

Member Function Documentation

◆ element()

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

Definition at line 40 of file Factory.php.

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

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  }
+ Here is the call graph for this function:

◆ root()

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

Definition at line 55 of file Factory.php.

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

◆ set()

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

Definition at line 67 of file Factory.php.

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

Field Documentation

◆ $data_factory

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

Definition at line 32 of file Factory.php.

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


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