ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilMDRequirement Class Reference
+ Inheritance diagram for ilMDRequirement:
+ Collaboration diagram for ilMDRequirement:

Public Member Functions

 setOrCompositeId (int $a_or_composite_id)
 
 getOrCompositeId ()
 
 setOperatingSystemName (string $a_val)
 
 getOperatingSystemName ()
 
 setOperatingSystemMinimumVersion (string $a_val)
 
 getOperatingSystemMinimumVersion ()
 
 setOperatingSystemMaximumVersion (string $a_val)
 
 getOperatingSystemMaximumVersion ()
 
 setBrowserName (string $a_val)
 
 getBrowserName ()
 
 setBrowserMinimumVersion (string $a_val)
 
 getBrowserMinimumVersion ()
 
 setBrowserMaximumVersion (string $a_val)
 
 getBrowserMaximumVersion ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (ilXmlWriter $writer)
 
 setMetaId (int $a_meta_id, bool $a_read_data=true)
 Compatibility fix for legacy MD classes for new db tables. More...
 
- Public Member Functions inherited from ilMDBase
 __construct (int $a_rbac_id=0, int $a_obj_id=0, string $a_type='')
 constructor More...
 
 read ()
 
 setRBACId (int $a_id)
 
 getRBACId ()
 
 setObjId (int $a_id)
 
 getObjId ()
 
 setObjType (string $a_type)
 
 getObjType ()
 
 setMetaId (int $a_meta_id, bool $a_read_data=true)
 
 getMetaId ()
 
 setParentType (string $a_parent_type)
 
 getParentType ()
 
 setParentId (int $a_id)
 
 getParentId ()
 
 setExportMode (bool $a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (ilXmlWriter $writer)
 

Static Public Member Functions

static _getIds (int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type, int $a_or_composite_id=0)
 

Protected Member Functions

 createOrUpdateOrs ()
 Compatibility fix for legacy MD classes for new db tables. More...
 
 createOrUpdateOr (int $id, string $type, string $name, string $min_version, string $max_version)
 Compatibility fix for legacy MD classes for new db tables. More...
 
 deleteAllOrs ()
 Compatibility fix for legacy MD classes for new db tables. More...
 
 readFirstOrs ()
 Compatibility fix for legacy MD classes for new db tables. More...
 
 readOrIds (int $parent_id)
 Compatibility fix for legacy MD classes for new db tables. More...
 
 getOrIdOS ()
 Compatibility fix for legacy MD classes for new db tables. More...
 
 getOrIdBrowser ()
 Compatibility fix for legacy MD classes for new db tables. More...
 

Private Attributes

const OS_TRANSLATION
 Compatibility fix for legacy MD classes for new db tables. More...
 
const const BROWSER_TRANSLATION
 
const const int $or_composite_id = 0
 
string $operating_system_name = ''
 
string $operating_system_minimum_version = ''
 
string $operating_system_maximum_version = ''
 
string $browser_name = ''
 
string $browser_minimum_version = ''
 
string $browser_maximum_version = ''
 
int $or_id_browser = 0
 Compatibility fix for legacy MD classes for new db tables. More...
 
int $or_id_os = 0
 

Additional Inherited Members

- Protected Attributes inherited from ilMDBase
ilLogger $log
 
ilDBInterface $db
 

Detailed Description

Definition at line 26 of file class.ilMDRequirement.php.

Member Function Documentation

◆ __getFields()

ilMDRequirement::__getFields ( )
Returns
array<string, array<string, mixed>>

Definition at line 201 of file class.ilMDRequirement.php.

References ilMDBase\getObjId(), ilMDBase\getObjType(), getOrCompositeId(), ilMDBase\getParentId(), ilMDBase\getParentType(), and ilMDBase\getRBACId().

Referenced by save(), and update().

201  : array
202  {
203  return array(
204  'rbac_id' => array('integer', $this->getRBACId()),
205  'obj_id' => array('integer', $this->getObjId()),
206  'obj_type' => array('text', $this->getObjType()),
207  'parent_type' => array('text', $this->getParentType()),
208  'parent_id' => array('integer', $this->getParentId()),
209  //'operating_system_name' => array('text', $this->getOperatingSystemName()),
210  //'os_min_version' => array('text', $this->getOperatingSystemMinimumVersion()),
211  //'os_max_version' => array('text', $this->getOperatingSystemMaximumVersion()),
212  //'browser_name' => array('text', $this->getBrowserName()),
213  //'browser_minimum_version' => array('text', $this->getBrowserMinimumVersion()),
214  //'browser_maximum_version' => array('text', $this->getBrowserMaximumVersion()),
215  'or_composite_id' => array('integer', $this->getOrCompositeId())
216  );
217  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getIds()

static ilMDRequirement::_getIds ( int  $a_rbac_id,
int  $a_obj_id,
int  $a_parent_id,
string  $a_parent_type,
int  $a_or_composite_id = 0 
)
static
Returns
int[]

Definition at line 279 of file class.ilMDRequirement.php.

References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().

Referenced by ilMDOrComposite\getRequirementIds(), and ilMDTechnical\getRequirementIds().

285  : array {
286  global $DIC;
287 
288  $ilDB = $DIC->database();
289 
290  $query = "SELECT meta_requirement_id FROM il_meta_requirement " .
291  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
292  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
293  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
294  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text') . " " .
295  "AND or_composite_id = " . $ilDB->quote($a_or_composite_id, 'integer');
296 
297  $res = $ilDB->query($query);
298  $ids = [];
299  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
300  $ids[] = (int) $row->meta_requirement_id;
301  }
302  return $ids;
303  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createOrUpdateOr()

ilMDRequirement::createOrUpdateOr ( int  $id,
string  $type,
string  $name,
string  $min_version,
string  $max_version 
)
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 339 of file class.ilMDRequirement.php.

References $id, ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

Referenced by createOrUpdateOrs().

345  : int {
346  if ($name === '' && $min_version === '' && $max_version === '') {
347  return 0;
348  }
349 
350  if (!$id) {
351  $this->db->insert(
352  'il_meta_or_composite',
353  [
354  'meta_or_composite_id' => ['integer', $next_id = $this->db->nextId('il_meta_or_composite')],
355  'rbac_id' => ['integer', $this->getRBACId()],
356  'obj_id' => ['integer', $this->getObjId()],
357  'obj_type' => ['text', $this->getObjType()],
358  'parent_type' => ['text', 'meta_requirement'],
359  'parent_id' => ['integer', $this->getMetaId()],
360  'type' => ['text', $type],
361  'name' => ['text', $name],
362  'min_version' => ['text', $min_version],
363  'max_version' => ['text', $max_version]
364  ]
365  );
366  return $next_id;
367  }
368 
369  $this->db->update(
370  'il_meta_or_composite',
371  [
372  'type' => ['text', $type],
373  'name' => ['text', $name],
374  'min_version' => ['text', $min_version],
375  'max_version' => ['text', $max_version]
376  ],
377  ['meta_or_composite_id' => ['integer', $id]]
378  );
379  return $id;
380  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createOrUpdateOrs()

ilMDRequirement::createOrUpdateOrs ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 308 of file class.ilMDRequirement.php.

References createOrUpdateOr(), getBrowserMaximumVersion(), getBrowserMinimumVersion(), getBrowserName(), getOperatingSystemMaximumVersion(), getOperatingSystemMinimumVersion(), getOperatingSystemName(), getOrIdBrowser(), and getOrIdOS().

Referenced by save(), and update().

308  : void
309  {
310  $os_name = (string) array_search(
311  $this->getOperatingSystemName(),
312  self::OS_TRANSLATION
313  );
314  $browser_name = (string) array_search(
315  $this->getBrowserName(),
316  self::BROWSER_TRANSLATION
317  );
318 
319  $this->or_id_os = $this->createOrUpdateOr(
320  $this->getOrIdOS(),
321  'operating system',
322  $os_name,
325  );
326 
327  $this->or_id_browser = $this->createOrUpdateOr(
328  $this->getOrIdBrowser(),
329  'browser',
331  $this->getBrowserMinimumVersion(),
332  $this->getBrowserMaximumVersion()
333  );
334  }
createOrUpdateOr(int $id, string $type, string $name, string $min_version, string $max_version)
Compatibility fix for legacy MD classes for new db tables.
getOrIdOS()
Compatibility fix for legacy MD classes for new db tables.
getOrIdBrowser()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilMDRequirement::delete ( )

Definition at line 185 of file class.ilMDRequirement.php.

References $res, deleteAllOrs(), and ilMDBase\getMetaId().

185  : bool
186  {
187  if ($this->getMetaId()) {
188  $query = "DELETE FROM il_meta_requirement " .
189  "WHERE meta_requirement_id = " . $this->db->quote($this->getMetaId(), 'integer');
190  $res = $this->db->manipulate($query);
191 
192  $this->deleteAllOrs();
193  return true;
194  }
195  return false;
196  }
$res
Definition: ltiservices.php:69
deleteAllOrs()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:

◆ deleteAllOrs()

ilMDRequirement::deleteAllOrs ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 385 of file class.ilMDRequirement.php.

References $res, and ilMDBase\getMetaId().

Referenced by delete().

385  : void
386  {
387  $query = "DELETE FROM il_meta_or_composite WHERE parent_type = 'meta_requirement'
388  AND parent_id = " . $this->db->quote($this->getMetaId(), 'integer');
389  $res = $this->db->manipulate($query);
390  }
$res
Definition: ltiservices.php:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBrowserMaximumVersion()

ilMDRequirement::getBrowserMaximumVersion ( )

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

References $browser_maximum_version.

Referenced by createOrUpdateOrs(), and toXML().

152  : string
153  {
155  }
+ Here is the caller graph for this function:

◆ getBrowserMinimumVersion()

ilMDRequirement::getBrowserMinimumVersion ( )

Definition at line 142 of file class.ilMDRequirement.php.

References $browser_minimum_version.

Referenced by createOrUpdateOrs(), and toXML().

142  : string
143  {
145  }
+ Here is the caller graph for this function:

◆ getBrowserName()

ilMDRequirement::getBrowserName ( )

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

References $browser_name.

Referenced by createOrUpdateOrs(), and toXML().

132  : string
133  {
134  return $this->browser_name;
135  }
+ Here is the caller graph for this function:

◆ getOperatingSystemMaximumVersion()

ilMDRequirement::getOperatingSystemMaximumVersion ( )

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

References $operating_system_maximum_version.

Referenced by createOrUpdateOrs(), and toXML().

110  : string
111  {
113  }
string $operating_system_maximum_version
+ Here is the caller graph for this function:

◆ getOperatingSystemMinimumVersion()

ilMDRequirement::getOperatingSystemMinimumVersion ( )

Definition at line 100 of file class.ilMDRequirement.php.

References $operating_system_minimum_version.

Referenced by createOrUpdateOrs(), and toXML().

100  : string
101  {
103  }
string $operating_system_minimum_version
+ Here is the caller graph for this function:

◆ getOperatingSystemName()

ilMDRequirement::getOperatingSystemName ( )

Definition at line 90 of file class.ilMDRequirement.php.

References $operating_system_name.

Referenced by createOrUpdateOrs(), and toXML().

90  : string
91  {
93  }
+ Here is the caller graph for this function:

◆ getOrCompositeId()

ilMDRequirement::getOrCompositeId ( )

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

References $or_composite_id.

Referenced by __getFields().

68  : int
69  {
71  }
const const int $or_composite_id
+ Here is the caller graph for this function:

◆ getOrIdBrowser()

ilMDRequirement::getOrIdBrowser ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 464 of file class.ilMDRequirement.php.

Referenced by createOrUpdateOrs(), and readFirstOrs().

464  : int
465  {
466  return $this->or_id_browser ?? 0;
467  }
+ Here is the caller graph for this function:

◆ getOrIdOS()

ilMDRequirement::getOrIdOS ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 456 of file class.ilMDRequirement.php.

Referenced by createOrUpdateOrs(), and readFirstOrs().

456  : int
457  {
458  return $this->or_id_os ?? 0;
459  }
+ Here is the caller graph for this function:

◆ read()

ilMDRequirement::read ( )

Definition at line 219 of file class.ilMDRequirement.php.

References $res, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), readFirstOrs(), ilMDBase\setObjId(), ilMDBase\setObjType(), setOrCompositeId(), ilMDBase\setParentId(), ilMDBase\setParentType(), and ilMDBase\setRBACId().

219  : bool
220  {
221  if ($this->getMetaId()) {
222  $query = "SELECT * FROM il_meta_requirement " .
223  "WHERE meta_requirement_id = " . $this->db->quote($this->getMetaId(), 'integer');
224 
225  $res = $this->db->query($query);
226  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
227  $this->setRBACId((int) $row->rbac_id);
228  $this->setObjId((int) $row->obj_id);
229  $this->setObjType($row->obj_type ?? '');
230  $this->setParentId((int) $row->parent_id);
231  $this->setParentType($row->parent_type);
232  //$this->setOperatingSystemName($row->operating_system_name ?? '');
233  //$this->setOperatingSystemMinimumVersion($row->os_min_version ?? '');
234  //$this->setOperatingSystemMaximumVersion($row->os_max_version ?? '');
235  //$this->setBrowserName($row->browser_name ?? '');
236  //$this->setBrowserMinimumVersion($row->browser_minimum_version ?? '');
237  //$this->setBrowserMaximumVersion($row->browser_maximum_version ?? '');
238  $this->setOrCompositeId((int) $row->or_composite_id);
239  }
240 
241  $this->readFirstOrs();
242  }
243  return true;
244  }
$res
Definition: ltiservices.php:69
setOrCompositeId(int $a_or_composite_id)
setRBACId(int $a_id)
readFirstOrs()
Compatibility fix for legacy MD classes for new db tables.
setObjId(int $a_id)
setParentId(int $a_id)
setParentType(string $a_parent_type)
setObjType(string $a_type)
+ Here is the call graph for this function:

◆ readFirstOrs()

ilMDRequirement::readFirstOrs ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 395 of file class.ilMDRequirement.php.

References $res, getOrIdBrowser(), getOrIdOS(), setBrowserMaximumVersion(), setBrowserMinimumVersion(), setBrowserName(), setOperatingSystemMaximumVersion(), setOperatingSystemMinimumVersion(), and setOperatingSystemName().

Referenced by read().

395  : void
396  {
397  $query = "SELECT * FROM il_meta_or_composite WHERE meta_or_composite_id = " .
398  $this->db->quote($this->getOrIdOS(), 'integer') .
399  " OR meta_or_composite_id = " . $this->db->quote($this->getOrIdBrowser(), 'integer');
400 
401  $res = $this->db->query($query);
402  while ($row = $this->db->fetchAssoc($res)) {
403  switch ($row['type']) {
404  case 'operating system':
405  if (key_exists($row['name'] ?? '', self::OS_TRANSLATION)) {
406  $row['name'] = self::OS_TRANSLATION[$row['name'] ?? ''];
407  }
408  $this->setOperatingSystemName($row['name'] ?? '');
409  $this->setOperatingSystemMinimumVersion($row['min_version'] ?? '');
410  $this->setOperatingSystemMaximumVersion($row['max_version'] ?? '');
411  break;
412 
413  case 'browser':
414  if (key_exists($row['name'] ?? '', self::BROWSER_TRANSLATION)) {
415  $row['name'] = self::BROWSER_TRANSLATION[$row['name'] ?? ''];
416  }
417  $this->setBrowserName($row['name'] ?? '');
418  $this->setBrowserMinimumVersion($row['min_version'] ?? '');
419  $this->setBrowserMaximumVersion($row['max_version'] ?? '');
420  break;
421  }
422  }
423  }
$res
Definition: ltiservices.php:69
setOperatingSystemMaximumVersion(string $a_val)
setBrowserMinimumVersion(string $a_val)
setOperatingSystemMinimumVersion(string $a_val)
setBrowserName(string $a_val)
setBrowserMaximumVersion(string $a_val)
setOperatingSystemName(string $a_val)
getOrIdOS()
Compatibility fix for legacy MD classes for new db tables.
getOrIdBrowser()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readOrIds()

ilMDRequirement::readOrIds ( int  $parent_id)
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 428 of file class.ilMDRequirement.php.

References $res, and ILIAS\Repository\int().

Referenced by setMetaId().

428  : void
429  {
430  $query = "SELECT meta_or_composite_id, type FROM il_meta_or_composite WHERE
431  parent_id = " . $this->db->quote($parent_id, 'integer') .
432  " ORDER BY meta_or_composite_id";
433 
434  $res = $this->db->query($query);
435  $browser_id = 0;
436  $os_id = 0;
437  while ($row = $this->db->fetchAssoc($res)) {
438  if (!$browser_id && $row['type'] === 'browser') {
439  $browser_id = (int) $row['meta_or_composite_id'];
440  }
441  if (!$os_id && $row['type'] === 'operating system') {
442  $os_id = (int) $row['meta_or_composite_id'];
443  }
444  if ($browser_id && $os_id) {
445  break;
446  }
447  }
448 
449  $this->or_id_browser = $browser_id;
450  $this->or_id_os = $os_id;
451  }
$res
Definition: ltiservices.php:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilMDRequirement::save ( )

Definition at line 157 of file class.ilMDRequirement.php.

References __getFields(), createOrUpdateOrs(), ilMDBase\getMetaId(), and setMetaId().

157  : int
158  {
159  $fields = $this->__getFields();
160  $fields['meta_requirement_id'] = array('integer', $next_id = $this->db->nextId('il_meta_requirement'));
161 
162  if ($this->db->insert('il_meta_requirement', $fields)) {
163  $this->setMetaId($next_id);
164  $this->createOrUpdateOrs();
165  return $this->getMetaId();
166  }
167  return 0;
168  }
setMetaId(int $a_meta_id, bool $a_read_data=true)
Compatibility fix for legacy MD classes for new db tables.
createOrUpdateOrs()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:

◆ setBrowserMaximumVersion()

ilMDRequirement::setBrowserMaximumVersion ( string  $a_val)

Definition at line 147 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

147  : void
148  {
149  $this->browser_maximum_version = $a_val;
150  }
+ Here is the caller graph for this function:

◆ setBrowserMinimumVersion()

ilMDRequirement::setBrowserMinimumVersion ( string  $a_val)

Definition at line 137 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

137  : void
138  {
139  $this->browser_minimum_version = $a_val;
140  }
+ Here is the caller graph for this function:

◆ setBrowserName()

ilMDRequirement::setBrowserName ( string  $a_val)

Definition at line 115 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

115  : bool
116  {
117  switch ($a_val) {
118  case 'Any':
119  case 'NetscapeCommunicator':
120  case 'MS-InternetExplorer':
121  case 'Opera':
122  case 'Amaya':
123  case 'Mozilla':
124  $this->browser_name = $a_val;
125  return true;
126 
127  default:
128  return false;
129  }
130  }
+ Here is the caller graph for this function:

◆ setMetaId()

ilMDRequirement::setMetaId ( int  $a_meta_id,
bool  $a_read_data = true 
)

Compatibility fix for legacy MD classes for new db tables.

Definition at line 472 of file class.ilMDRequirement.php.

References readOrIds().

Referenced by save().

472  : void
473  {
474  $this->readOrIds($a_meta_id);
475  parent::setMetaId($a_meta_id, $a_read_data);
476  }
readOrIds(int $parent_id)
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOperatingSystemMaximumVersion()

ilMDRequirement::setOperatingSystemMaximumVersion ( string  $a_val)

Definition at line 105 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

105  : void
106  {
107  $this->operating_system_maximum_version = $a_val;
108  }
+ Here is the caller graph for this function:

◆ setOperatingSystemMinimumVersion()

ilMDRequirement::setOperatingSystemMinimumVersion ( string  $a_val)

Definition at line 95 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

95  : void
96  {
97  $this->operating_system_minimum_version = $a_val;
98  }
+ Here is the caller graph for this function:

◆ setOperatingSystemName()

ilMDRequirement::setOperatingSystemName ( string  $a_val)

Definition at line 73 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

73  : bool
74  {
75  switch ($a_val) {
76  case 'PC-DOS':
77  case 'MS-Windows':
78  case 'MacOS':
79  case 'Unix':
80  case 'Multi-OS':
81  case 'None':
82  $this->operating_system_name = $a_val;
83  return true;
84 
85  default:
86  return false;
87  }
88  }
+ Here is the caller graph for this function:

◆ setOrCompositeId()

ilMDRequirement::setOrCompositeId ( int  $a_or_composite_id)

Definition at line 63 of file class.ilMDRequirement.php.

Referenced by read().

63  : void
64  {
65  $this->or_composite_id = $a_or_composite_id;
66  }
+ Here is the caller graph for this function:

◆ toXML()

ilMDRequirement::toXML ( ilXmlWriter  $writer)

Definition at line 251 of file class.ilMDRequirement.php.

References getBrowserMaximumVersion(), getBrowserMinimumVersion(), getBrowserName(), getOperatingSystemMaximumVersion(), getOperatingSystemMinimumVersion(), getOperatingSystemName(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

251  : void
252  {
253  $writer->xmlStartTag('Requirement');
254  $writer->xmlStartTag('Type');
255 
256  if ($this->getOperatingSystemName() !== '') {
257  $writer->xmlElement('OperatingSystem', array(
258  'Name' => $this->getOperatingSystemName() ?: 'None',
259  'MinimumVersion' => $this->getOperatingSystemMinimumVersion(),
260  'MaximumVersion' => $this->getOperatingSystemMaximumVersion()
261  ));
262  }
263  if ($this->getBrowserName() !== '') {
264  $writer->xmlElement('Browser', array(
265  'Name' => $this->getBrowserName() ?: 'Any',
266  'MinimumVersion' => $this->getBrowserMinimumVersion(),
267  'MaximumVersion' => $this->getBrowserMaximumVersion()
268  ));
269  }
270  $writer->xmlEndTag('Type');
271  $writer->xmlEndTag('Requirement');
272  }
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
+ Here is the call graph for this function:

◆ update()

ilMDRequirement::update ( )

Definition at line 170 of file class.ilMDRequirement.php.

References __getFields(), createOrUpdateOrs(), and ilMDBase\getMetaId().

170  : bool
171  {
172  if (!$this->getMetaId()) {
173  return false;
174  }
175 
176  $this->createOrUpdateOrs();
177 
178  return (bool) $this->db->update(
179  'il_meta_requirement',
180  $this->__getFields(),
181  array("meta_requirement_id" => array('integer', $this->getMetaId()))
182  );
183  }
createOrUpdateOrs()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:

Field Documentation

◆ $browser_maximum_version

string ilMDRequirement::$browser_maximum_version = ''
private

Definition at line 54 of file class.ilMDRequirement.php.

Referenced by getBrowserMaximumVersion().

◆ $browser_minimum_version

string ilMDRequirement::$browser_minimum_version = ''
private

Definition at line 53 of file class.ilMDRequirement.php.

Referenced by getBrowserMinimumVersion().

◆ $browser_name

string ilMDRequirement::$browser_name = ''
private

Definition at line 52 of file class.ilMDRequirement.php.

Referenced by getBrowserName().

◆ $operating_system_maximum_version

string ilMDRequirement::$operating_system_maximum_version = ''
private

Definition at line 51 of file class.ilMDRequirement.php.

Referenced by getOperatingSystemMaximumVersion().

◆ $operating_system_minimum_version

string ilMDRequirement::$operating_system_minimum_version = ''
private

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

Referenced by getOperatingSystemMinimumVersion().

◆ $operating_system_name

string ilMDRequirement::$operating_system_name = ''
private

Definition at line 49 of file class.ilMDRequirement.php.

Referenced by getOperatingSystemName().

◆ $or_composite_id

const const int ilMDRequirement::$or_composite_id = 0
private

Definition at line 48 of file class.ilMDRequirement.php.

Referenced by getOrCompositeId().

◆ $or_id_browser

int ilMDRequirement::$or_id_browser = 0
private

Compatibility fix for legacy MD classes for new db tables.

Definition at line 59 of file class.ilMDRequirement.php.

◆ $or_id_os

int ilMDRequirement::$or_id_os = 0
private

Definition at line 60 of file class.ilMDRequirement.php.

◆ BROWSER_TRANSLATION

const const ilMDRequirement::BROWSER_TRANSLATION
private
Initial value:
= [
'any' => 'Any'

Definition at line 40 of file class.ilMDRequirement.php.

◆ OS_TRANSLATION

const ilMDRequirement::OS_TRANSLATION
private
Initial value:
= [
'pc-dos' => 'PC-DOS'

Compatibility fix for legacy MD classes for new db tables.

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


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