ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMDFactory Class Reference
+ Collaboration diagram for ilMDFactory:

Static Public Member Functions

static _getInstance ($a_type, $a_index, $a_technical_id=0)
 

Detailed Description

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

Member Function Documentation

◆ _getInstance()

static ilMDFactory::_getInstance (   $a_type,
  $a_index,
  $a_technical_id = 0 
)
static

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

References $a_type, $key, and $req.

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

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

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