ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMDFactory Class Reference
+ Collaboration diagram for ilMDFactory:

Static Public Member Functions

static _getInstance (string $a_type, int $a_index, ?int $a_technical_id=0)
 

Detailed Description

Definition at line 31 of file class.ilMDFactory.php.

Member Function Documentation

◆ _getInstance()

static ilMDFactory::_getInstance ( string  $a_type,
int  $a_index,
?int  $a_technical_id = 0 
)
static
Returns
null|ilMDTechnical|ilMDTechnical|ilMDRequirement|ilMDLocation|ilMDFormat|ilMDLifecycle|ilMDEntity|ilMDContribute|ilMDIdentifier|ilMDDescription|ilMDKeyword|ilMDLanguage|ilMDRights|ilMDEducational|ilMDTypicalAgeRange|ilMDRelation|ilMDIdentifier_|ilMDAnnotation|ilMDClassification|ilMDTaxonPath|ilMDTaxon|ilMDMetaMetadata

Definition at line 36 of file class.ilMDFactory.php.

References ILIAS\LTI\ToolProvider\$key, and XapiProxy\$req.

Referenced by ilMDEditorGUI\deleteElement(), and ilMDEditorGUI\deleteSection().

36  : ?object
37  {
38  switch ($a_type) {
39  case 'meta_technical':
40 
41  $tec = new ilMDTechnical();
42  $tec->setMetaId($a_index);
43 
44  return $tec;
45 
46  case 'meta_or_composite':
47 
48  $tec = new ilMDTechnical();
49  $tec->setMetaId($a_technical_id);
50 
51  return $tec->getOrComposite($a_index);
52 
53  case 'meta_requirement':
54 
55  $req = new ilMDRequirement();
56  $req->setMetaId($a_index);
57 
58  return $req;
59 
60  case 'meta_location':
61 
62  $loc = new ilMDLocation();
63  $loc->setMetaId($a_index);
64 
65  return $loc;
66 
67  case 'meta_format':
68 
69  $for = new ilMDFormat();
70  $for->setMetaId($a_index);
71 
72  return $for;
73 
74  case 'meta_lifecycle':
75 
76  $lif = new ilMDLifecycle();
77  $lif->setMetaId($a_index);
78 
79  return $lif;
80 
81  case 'meta_entity':
82 
83  $ent = new ilMDEntity();
84  $ent->setMetaId($a_index);
85 
86  return $ent;
87 
88  case 'meta_contribute':
89 
90  $con = new ilMDContribute();
91  $con->setMetaId($a_index);
92 
93  return $con;
94 
95  case 'meta_identifier':
96 
97  $ide = new ilMDIdentifier();
98  $ide->setMetaId($a_index);
99 
100  return $ide;
101 
102  case 'educational_description':
103  case 'meta_description':
104 
105  $des = new ilMDDescription();
106  $des->setMetaId($a_index);
107 
108  return $des;
109 
110  case 'meta_keyword':
111  case 'classification_keyword':
112 
113  $key = new ilMDKeyword();
114  $key->setMetaId($a_index);
115 
116  return $key;
117 
118  case 'educational_language':
119  case 'meta_language':
120 
121  $lan = new ilMDLanguage();
122  $lan->setMetaId($a_index);
123 
124  return $lan;
125 
126  case 'meta_rights':
127 
128  $rights = new ilMDRights();
129  $rights->setMetaId($a_index);
130  return $rights;
131 
132  case 'meta_educational':
133 
134  $edu = new ilMDEducational();
135  $edu->setMetaId($a_index);
136  return $edu;
137 
138  case 'educational_typical_age_range':
139 
140  $age = new ilMDTypicalAgeRange();
141  $age->setMetaId($a_index);
142  return $age;
143 
144  case 'meta_relation':
145 
146  $relation = new ilMDRelation();
147  $relation->setMetaId($a_index);
148  return $relation;
149 
150  case 'relation_resource_identifier':
151 
152  $ide = new ilMDIdentifier_();
153  $ide->setMetaId($a_index);
154 
155  return $ide;
156 
157  case 'relation_resource_description':
158 
159  $des = new ilMDDescription();
160  $des->setMetaId($a_index);
161 
162  return $des;
163 
164  case 'meta_annotation':
165 
166  $anno = new ilMDAnnotation();
167  $anno->setMetaId($a_index);
168  return $anno;
169 
170  case 'meta_classification':
171 
172  $class = new ilMDClassification();
173  $class->setMetaId($a_index);
174  return $class;
175 
176  case 'classification_taxon_path':
177 
178  $tax_path = new ilMDTaxonPath();
179 
180  $tax_path->setMetaId($a_index);
181  return $tax_path;
182 
183  case 'classification_taxon':
184 
185  $tax = new ilMDTaxon();
186  $tax->setMetaId($a_index);
187  return $tax;
188 
189  case 'meta_meta_metadata':
190 
191  $met = new ilMDMetaMetadata();
192  $met->setMetaId($a_index);
193  return $met;
194 
195  default:
196  echo $a_type . " not known";
197  return null;
198  }
199  }
catch(\Exception $e) $req
Definition: xapiproxy.php:93
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the caller graph for this function:

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