ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMD5295Technical Class Reference
+ Inheritance diagram for ilMD5295Technical:
+ Collaboration diagram for ilMD5295Technical:

Public Member Functions

 getPossibleSubelements ()
 
getFormatIds ()
 
getFormat ($a_format_id)
 
addFormat ()
 
getLocationIds ()
 
getLocation ($a_location_id)
 
addLocation ()
 
getRequirementIds ()
 
getRequirement ($a_requirement_id)
 
addRequirement ()
 
getOrCompositeIds ()
 
getOrComposite ($a_or_composite_id)
 
addOrComposite ()
 
 setSize ($a_size)
 
 getSize ()
 
 setInstallationRemarks ($a_val)
 
 getInstallationRemarks ()
 
 setInstallationRemarksLanguage (&$lng_obj)
 
getInstallationRemarksLanguage ()
 
 getInstallationRemarksLanguageCode ()
 
 setOtherPlatformRequirements ($a_val)
 
 getOtherPlatformRequirements ()
 
 setOtherPlatformRequirementsLanguage (&$lng_obj)
 
getOtherPlatformRequirementsLanguage ()
 
 getOtherPlatformRequirementsLanguageCode ()
 
 setDuration ($a_val)
 
 getDuration ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
- Public Member Functions inherited from ilMD5295Base
 __construct ( $a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 setExportMode ($a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 

Static Public Member Functions

static _getId ($a_rbac_id, $a_obj_id)
 

Additional Inherited Members

- Data Fields inherited from ilMD5295Base
 $rbac_id
 
 $obj_id
 
 $obj_type
 
 $export_mode = false
 
- Protected Attributes inherited from ilMD5295Base
 $log
 

Detailed Description

Definition at line 33 of file class.ilMD5295Technical.php.

Member Function Documentation

◆ __getFields()

ilMD5295Technical::__getFields ( )

Definition at line 298 of file class.ilMD5295Technical.php.

299 {
300 return array('rbac_id' => array('integer',$this->getRBACId()),
301 'obj_id' => array('integer',$this->getObjId()),
302 'obj_type' => array('text',$this->getObjType()),
303 't_size' => array('text',$this->getSize()),
304 'ir' => array('text',$this->getInstallationRemarks()),
305 'ir_language' => array('text',$this->getInstallationRemarksLanguageCode()),
306 'opr' => array('text',$this->getOtherPlatformRequirements()),
307 'opr_language' => array('text',$this->getOtherPlatformRequirementsLanguageCode()),
308 'duration' => array('text',$this->getDuration()));
309 }

References getDuration(), getInstallationRemarks(), getInstallationRemarksLanguageCode(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), getOtherPlatformRequirements(), getOtherPlatformRequirementsLanguageCode(), ilMD5295Base\getRBACId(), and getSize().

Referenced by save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getId()

static ilMD5295Technical::_getId (   $a_rbac_id,
  $a_obj_id 
)
static

Definition at line 407 of file class.ilMD5295Technical.php.

408 {
409 global $DIC;
410
411 $ilDB = $DIC['ilDB'];
412
413 $query = "SELECT meta_technical_id FROM il_meta_technical " .
414 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
415 "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
416
417 $res = $ilDB->query($query);
418 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
419 return $row->meta_technical_id;
420 }
421 return false;
422 }
$query
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMD5295\getTechnical().

+ Here is the caller graph for this function:

◆ addFormat()

& ilMD5295Technical::addFormat ( )

Definition at line 68 of file class.ilMD5295Technical.php.

69 {
70 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Format.php';
71
72 $for = new ilMD5295Format($this->getRBACId(), $this->getObjId(), $this->getObjType());
73
74 return $for;
75 }

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

+ Here is the call graph for this function:

◆ addLocation()

& ilMD5295Technical::addLocation ( )

Definition at line 94 of file class.ilMD5295Technical.php.

95 {
96 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Location.php';
97
98 $loc = new ilMD5295Location($this->getRBACId(), $this->getObjId(), $this->getObjType());
99 $loc->setParentId($this->getMetaId());
100 $loc->setParentType('meta_technical');
101
102 return $loc;
103 }

References ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

+ Here is the call graph for this function:

◆ addOrComposite()

& ilMD5295Technical::addOrComposite ( )

Definition at line 152 of file class.ilMD5295Technical.php.

153 {
154 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295OrComposite.php';
155
156 $orc = new ilMD5295OrComposite($this->getRBACId(), $this->getObjId(), $this->getObjType());
157 $orc->setParentId($this->getMetaId());
158 $orc->setParentType('meta_technical');
159
160 return $orc;
161 }

References ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

+ Here is the call graph for this function:

◆ addRequirement()

& ilMD5295Technical::addRequirement ( )

Definition at line 122 of file class.ilMD5295Technical.php.

123 {
124 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Requirement.php';
125
126 $rec = new ilMD5295Requirement($this->getRBACId(), $this->getObjId(), $this->getObjType());
127 $rec->setParentId($this->getMetaId());
128 $rec->setParentType('meta_technical');
129
130 return $rec;
131 }

References ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

+ Here is the call graph for this function:

◆ delete()

ilMD5295Technical::delete ( )

Reimplemented from ilMD5295Base.

Definition at line 263 of file class.ilMD5295Technical.php.

264 {
265 global $DIC;
266
267 $ilDB = $DIC['ilDB'];
268
269 if ($this->getMetaId()) {
270 $query = "DELETE FROM il_meta_technical " .
271 "WHERE meta_technical_id = " . $ilDB->quote($this->getMetaId(), 'integer');
272 $res = $ilDB->manipulate($query);
273
274 foreach ($this->getFormatIds() as $id) {
275 $for = &$this->getFormat($id);
276 $for->delete();
277 }
278
279 foreach ($this->getLocationIds() as $id) {
280 $loc = &$this->getLocation($id);
281 $loc->delete();
282 }
283 foreach ($this->getRequirementIds() as $id) {
284 $req = &$this->getRequirement($id);
285 $req->delete();
286 }
287 foreach ($this->getOrCompositeIds() as $id) {
288 $orc = &$this->getOrComposite($id);
289 $orc->delete();
290 }
291
292 return true;
293 }
294 return false;
295 }
& getLocation($a_location_id)
& getRequirement($a_requirement_id)
& getOrComposite($a_or_composite_id)

References $DIC, $ilDB, $query, XapiProxy\$req, $res, getFormat(), getFormatIds(), getLocation(), getLocationIds(), ilMD5295Base\getMetaId(), getOrComposite(), getOrCompositeIds(), getRequirement(), and getRequirementIds().

+ Here is the call graph for this function:

◆ getDuration()

ilMD5295Technical::getDuration ( )

Definition at line 222 of file class.ilMD5295Technical.php.

223 {
224 return $this->duration;
225 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getFormat()

& ilMD5295Technical::getFormat (   $a_format_id)

Definition at line 56 of file class.ilMD5295Technical.php.

57 {
58 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Format.php';
59
60 if (!$a_format_id) {
61 return false;
62 }
63 $for = new ilMD5295Format($this, $a_format_id);
64 $for->setMetaId($a_format_id);
65
66 return $for;
67 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getFormatIds()

& ilMD5295Technical::getFormatIds ( )

Definition at line 50 of file class.ilMD5295Technical.php.

51 {
52 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Format.php';
53
54 return ilMD5295Format::_getIds($this->getRBACId(), $this->getObjId());
55 }
static _getIds($a_rbac_id, $a_obj_id)

References ilMD5295Format\_getIds(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstallationRemarks()

ilMD5295Technical::getInstallationRemarks ( )

Definition at line 176 of file class.ilMD5295Technical.php.

177 {
178 return $this->installation_remarks;
179 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getInstallationRemarksLanguage()

& ilMD5295Technical::getInstallationRemarksLanguage ( )

Definition at line 186 of file class.ilMD5295Technical.php.

187 {
188 return is_object($this->installation_remarks_language) ? $this->installation_remarks_language : false;
189 }

◆ getInstallationRemarksLanguageCode()

ilMD5295Technical::getInstallationRemarksLanguageCode ( )

Definition at line 190 of file class.ilMD5295Technical.php.

191 {
192 return is_object($this->installation_remarks_language) ? $this->installation_remarks_language->getLanguageCode() : false;
193 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getLocation()

& ilMD5295Technical::getLocation (   $a_location_id)

Definition at line 82 of file class.ilMD5295Technical.php.

83 {
84 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Location.php';
85
86 if (!$a_location_id) {
87 return false;
88 }
89 $loc = new ilMD5295Location();
90 $loc->setMetaId($a_location_id);
91
92 return $loc;
93 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getLocationIds()

& ilMD5295Technical::getLocationIds ( )

Definition at line 76 of file class.ilMD5295Technical.php.

77 {
78 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Location.php';
79
80 return ilMD5295Location::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_technical');
81 }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

References ilMD5295Location\_getIds(), ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOrComposite()

& ilMD5295Technical::getOrComposite (   $a_or_composite_id)

Definition at line 138 of file class.ilMD5295Technical.php.

139 {
140 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295OrComposite.php';
141
142 if (!$a_or_composite_id) {
143 return false;
144 }
145 $orc = new ilMD5295OrComposite($this->getRBACId(), $this->getObjId(), $this->getObjType());
146 $orc->setOrCompositeId($a_or_composite_id);
147 $orc->setParentId($this->getMetaId());
148 $orc->setParentType('meta_technical');
149
150 return $orc;
151 }

References ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOrCompositeIds()

& ilMD5295Technical::getOrCompositeIds ( )

Definition at line 132 of file class.ilMD5295Technical.php.

133 {
134 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295OrComposite.php';
135
136 return ilMD5295OrComposite::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_technical');
137 }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type, $a_or_composite_id=0)

References ilMD5295OrComposite\_getIds(), ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by delete(), getPossibleSubelements(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOtherPlatformRequirements()

ilMD5295Technical::getOtherPlatformRequirements ( )

Definition at line 198 of file class.ilMD5295Technical.php.

199 {
200 return $this->other_platform_requirements;
201 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getOtherPlatformRequirementsLanguage()

& ilMD5295Technical::getOtherPlatformRequirementsLanguage ( )

Definition at line 208 of file class.ilMD5295Technical.php.

209 {
210 return is_object($this->other_platform_requirements_language) ? $this->other_platform_requirements_language : false;
211 }

◆ getOtherPlatformRequirementsLanguageCode()

ilMD5295Technical::getOtherPlatformRequirementsLanguageCode ( )

Definition at line 212 of file class.ilMD5295Technical.php.

213 {
214 return is_object($this->other_platform_requirements_language)
215 ? $this->other_platform_requirements_language->getLanguageCode()
216 : false;
217 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getPossibleSubelements()

ilMD5295Technical::getPossibleSubelements ( )

Definition at line 35 of file class.ilMD5295Technical.php.

36 {
37 $subs['Format'] = 'meta_format';
38 $subs['Location'] = 'meta_location';
39 if (!$this->getOrCompositeIds()) {
40 $subs['Requirement'] = 'meta_requirement';
41 }
42 if (!$this->getRequirementIds()) {
43 $subs['OrComposite'] = 'meta_or_composite';
44 }
45
46 return $subs;
47 }

References getOrCompositeIds(), and getRequirementIds().

+ Here is the call graph for this function:

◆ getRequirement()

& ilMD5295Technical::getRequirement (   $a_requirement_id)

Definition at line 110 of file class.ilMD5295Technical.php.

111 {
112 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Requirement.php';
113
114 if (!$a_requirement_id) {
115 return false;
116 }
117 $rec = new ilMD5295Requirement();
118 $rec->setMetaId($a_requirement_id);
119
120 return $rec;
121 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getRequirementIds()

& ilMD5295Technical::getRequirementIds ( )

Definition at line 104 of file class.ilMD5295Technical.php.

105 {
106 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Requirement.php';
107
108 return ilMD5295Requirement::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_technical');
109 }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type, $a_or_composite_id=0)

References ilMD5295Requirement\_getIds(), ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by delete(), getPossibleSubelements(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSize()

ilMD5295Technical::getSize ( )

Definition at line 168 of file class.ilMD5295Technical.php.

169 {
170 return $this->size;
171 }
$size
Definition: RandomTest.php:84

References $size.

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ read()

ilMD5295Technical::read ( )

Definition at line 311 of file class.ilMD5295Technical.php.

312 {
313 global $DIC;
314
315 $ilDB = $DIC['ilDB'];
316
317 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295LanguageItem.php';
318
319 if ($this->getMetaId()) {
320 $query = "SELECT * FROM il_meta_technical " .
321 "WHERE meta_technical_id = " . $ilDB->quote($this->getMetaId(), 'integer') . " ";
322
323 $res = $ilDB->query($query);
324 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
325 $this->setRBACId($row->rbac_id);
326 $this->setObjId($row->obj_id);
327 $this->setObjType($row->obj_type);
328 $this->setSize($row->t_size);
329 $this->setInstallationRemarks($row->ir);
330 $this->setInstallationRemarksLanguage(new ilMD5295LanguageItem($row->ir_language));
331 $this->setOtherPlatformRequirements($row->opr);
332 $this->setOtherPlatformRequirementsLanguage(new ilMD5295LanguageItem($row->opr_language));
333 $this->setDuration($row->duration);
334 }
335 return true;
336 }
337 return false;
338 }
setInstallationRemarksLanguage(&$lng_obj)
setOtherPlatformRequirementsLanguage(&$lng_obj)

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ilMD5295Base\getMetaId(), setDuration(), setInstallationRemarks(), setInstallationRemarksLanguage(), ilMD5295Base\setObjId(), ilMD5295Base\setObjType(), setOtherPlatformRequirements(), setOtherPlatformRequirementsLanguage(), ilMD5295Base\setRBACId(), and setSize().

+ Here is the call graph for this function:

◆ save()

ilMD5295Technical::save ( )

Reimplemented from ilMD5295Base.

Definition at line 229 of file class.ilMD5295Technical.php.

230 {
231 global $DIC;
232
233 $ilDB = $DIC['ilDB'];
234
235 $fields = $this->__getFields();
236 $fields['meta_technical_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_technical'));
237
238 if ($this->db->insert('il_meta_technical', $fields)) {
239 $this->setMetaId($next_id);
240 return $this->getMetaId();
241 }
242 return false;
243 }
setMetaId($a_meta_id, $a_read_data=true)

References $DIC, $ilDB, __getFields(), ilMD5295Base\getMetaId(), and ilMD5295Base\setMetaId().

+ Here is the call graph for this function:

◆ setDuration()

ilMD5295Technical::setDuration (   $a_val)

Definition at line 218 of file class.ilMD5295Technical.php.

219 {
220 $this->duration = $a_val;
221 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setInstallationRemarks()

ilMD5295Technical::setInstallationRemarks (   $a_val)

Definition at line 172 of file class.ilMD5295Technical.php.

173 {
174 $this->installation_remarks = $a_val;
175 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setInstallationRemarksLanguage()

ilMD5295Technical::setInstallationRemarksLanguage ( $lng_obj)

Definition at line 180 of file class.ilMD5295Technical.php.

181 {
182 if (is_object($lng_obj)) {
183 $this->installation_remarks_language = &$lng_obj;
184 }
185 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setOtherPlatformRequirements()

ilMD5295Technical::setOtherPlatformRequirements (   $a_val)

Definition at line 194 of file class.ilMD5295Technical.php.

195 {
196 $this->other_platform_requirements = $a_val;
197 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setOtherPlatformRequirementsLanguage()

ilMD5295Technical::setOtherPlatformRequirementsLanguage ( $lng_obj)

Definition at line 202 of file class.ilMD5295Technical.php.

203 {
204 if (is_object($lng_obj)) {
205 $this->other_platform_requirements_language = &$lng_obj;
206 }
207 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setSize()

ilMD5295Technical::setSize (   $a_size)

Definition at line 164 of file class.ilMD5295Technical.php.

165 {
166 $this->size = $a_size;
167 }

Referenced by read().

+ Here is the caller graph for this function:

◆ toXML()

ilMD5295Technical::toXML ( $writer)

Reimplemented from ilMD5295Base.

Definition at line 345 of file class.ilMD5295Technical.php.

346 {
347 $writer->xmlStartTag('Technical');
348
349 // Format
350 foreach ($this->getFormatIds() as $id) {
351 $for = &$this->getFormat($id);
352 $for->toXML($writer);
353 }
354
355 // Size
356 if (strlen($this->getSize())) {
357 $writer->xmlElement('Size', null, $this->getSize());
358 }
359
360 // Location
361 foreach ($this->getLocationIds() as $id) {
362 $loc = &$this->getLocation($id);
363 $loc->toXML($writer);
364 }
365
366 // Requirement
367 foreach ($this->getRequirementIds() as $id) {
368 $req = &$this->getRequirement($id);
369 $req->toXML($writer);
370 }
371
372 // OrComposite
373 foreach ($this->getOrCompositeIds() as $id) {
374 $orc = &$this->getOrComposite($id);
375 $orc->toXML($writer);
376 }
377
378 // InstallationRemarks
379 if (strlen($this->getInstallationRemarks())) {
380 $writer->xmlElement(
381 'InstallationRemarks',
382 array('Language' => $this->getInstallationRemarksLanguageCode()
384 : 'en'),
386 );
387 }
388
389 // OtherPlatformRequirements
390 if (strlen($this->getOtherPlatformRequirements())) {
391 $writer->xmlElement(
392 'OtherPlatformRequirements',
393 array('Language' => $this->getOtherPlatformRequirementsLanguageCode()
395 : 'en'),
397 );
398 }
399 // Duration
400 if (strlen($this->getDuration())) {
401 $writer->xmlElement('Duration', null, $this->getDuration());
402 }
403
404 $writer->xmlEndTag('Technical');
405 }

References XapiProxy\$req, getDuration(), getFormat(), getFormatIds(), getInstallationRemarks(), getInstallationRemarksLanguageCode(), getLocation(), getLocationIds(), getOrComposite(), getOrCompositeIds(), getOtherPlatformRequirements(), getOtherPlatformRequirementsLanguageCode(), getRequirement(), getRequirementIds(), and getSize().

+ Here is the call graph for this function:

◆ update()

ilMD5295Technical::update ( )

Reimplemented from ilMD5295Base.

Definition at line 245 of file class.ilMD5295Technical.php.

246 {
247 global $DIC;
248
249 $ilDB = $DIC['ilDB'];
250
251 if ($this->getMetaId()) {
252 if ($this->db->update(
253 'il_meta_technical',
254 $this->__getFields(),
255 array("meta_technical_id" => array('integer',$this->getMetaId()))
256 )) {
257 return true;
258 }
259 }
260 return false;
261 }

References $DIC, $ilDB, and ilMD5295Base\getMetaId().

+ Here is the call graph for this function:

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