19 declare(strict_types=1);
42 switch ($data->type()) {
43 case Type::VOCAB_VALUE:
47 return $this->
language($data->value());
50 return $this->
datetime($data->value());
53 return $this->
duration($data->value());
56 return $data->value();
64 'ispartof' =>
'is_part_of',
'haspart' =>
'has_part',
65 'isversionof' =>
'is_version_of',
'hasversion' =>
'has_version',
66 'isformatof' =>
'is_format_of',
'hasformat' =>
'has_format',
67 'references' =>
'references',
68 'isreferencedby' =>
'is_referenced_by',
69 'isbasedon' =>
'is_based_on',
'isbasisfor' =>
'is_basis_for',
70 'requires' =>
'requires',
'isrequiredby' =>
'is_required_by',
71 'graphical designer' =>
'graphicaldesigner',
72 'technical implementer' =>
'technicalimplementer',
73 'content provider' =>
'contentprovider',
74 'technical validator' =>
'technicalvalidator',
75 'educational validator' =>
'educationalvalidator',
76 'script writer' =>
'scriptwriter',
77 'instructional designer' =>
'instructionaldesigner',
78 'subject matter expert' =>
'subjectmatterexpert',
79 'diagram' =>
'diagramm' 81 if (array_key_exists($value, $exceptions)) {
82 $value = $exceptions[$value];
85 return $this->utilities->txt(
'meta_' . $this->
fillSpaces($value));
88 public function language(
string $language): string
90 return $this->utilities->txt(
'meta_l_' . $language);
95 $date = $this->data_helper->datetimeToObject($datetime);
96 return $this->utilities->getUserDateFormat()->applyTo($date);
106 [
'minutes',
'minute'],
107 [
'seconds',
'second'],
110 foreach ($this->data_helper->durationToIterator($duration) as
$key => $match) {
111 if (!is_null($match)) {
115 $this->utilities->txt($labels[$key][1]) :
116 $this->utilities->txt($labels[$key][0]));
119 return implode(
', ', $res_array);
124 $string = str_replace(
' ',
'_', $string);
125 return strtolower($string);
130 $string = preg_replace(
'/(?<=[a-z])(?=[A-Z])/',
' ', $string);
131 return strtolower($string);