ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Data.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
25class Data implements DataInterface
26{
27 protected Type $type;
28 protected string $value;
29 protected SlotIdentifier $vocabulary_slot;
30
31 public function __construct(
32 Type $type,
33 string $value,
34 SlotIdentifier $vocabulary_slot
35 ) {
36 $this->type = $type;
37 $this->value = $value;
38 $this->vocabulary_slot = $vocabulary_slot;
39 }
40
41 public function type(): Type
42 {
43 return $this->type;
44 }
45
46 public function value(): string
47 {
48 return $this->value;
49 }
50
51 public function vocabularySlot(): SlotIdentifier
52 {
54 }
55}
__construct(Type $type, string $value, SlotIdentifier $vocabulary_slot)
Definition: Data.php:31
vocabularySlot()
Vocabulary slot the data belongs to (important for making vocab values/strings presentable).
Definition: Data.php:51
SlotIdentifier $vocabulary_slot
Definition: Data.php:29
value()
Value of the data, in a format according to its type.
Definition: Data.php:46