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

Public Member Functions

 setOrCompositeId ($a_or_composite_id)
 
 getOrCompositeId ()
 
 setOperatingSystemName ($a_val)
 
 getOperatingSystemName ()
 
 setOperatingSystemMinimumVersion ($a_val)
 
 getOperatingSystemMinimumVersion ()
 
 setOperatingSystemMaximumVersion ($a_val)
 
 getOperatingSystemMaximumVersion ()
 
 setBrowserName ($a_val)
 
 getBrowserName ()
 
 setBrowserMinimumVersion ($a_val)
 
 getBrowserMinimumVersion ()
 
 setBrowserMaximumVersion ($a_val)
 
 getBrowserMaximumVersion ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 setOrCompositeId ($a_or_composite_id)
 
 getOrCompositeId ()
 
 setOperatingSystemName ($a_val)
 
 getOperatingSystemName ()
 
 setOperatingSystemMinimumVersion ($a_val)
 
 getOperatingSystemMinimumVersion ()
 
 setOperatingSystemMaximumVersion ($a_val)
 
 getOperatingSystemMaximumVersion ()
 
 setBrowserName ($a_val)
 
 getBrowserName ()
 
 setBrowserMinimumVersion ($a_val)
 
 getBrowserMinimumVersion ()
 
 setBrowserMaximumVersion ($a_val)
 
 getBrowserMaximumVersion ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type, $a_or_composite_id=0)
 
- Public Member Functions inherited from ilMDBase
 __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)
 
 __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 ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 

Static Public Member Functions

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

Additional Inherited Members

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

Detailed Description

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

Member Function Documentation

◆ __getFields() [1/2]

ilMDRequirement::__getFields ( )

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

References array, getBrowserMaximumVersion(), getBrowserMinimumVersion(), getBrowserName(), ilMDBase\getObjId(), ilMDBase\getObjType(), getOperatingSystemMaximumVersion(), getOperatingSystemMinimumVersion(), getOperatingSystemName(), getOrCompositeId(), ilMDBase\getParentId(), ilMDBase\getParentType(), and ilMDBase\getRBACId().

Referenced by save().

164  {
165  return array('rbac_id' => array('integer',$this->getRBACId()),
166  'obj_id' => array('integer',$this->getObjId()),
167  'obj_type' => array('text',$this->getObjType()),
168  'parent_type' => array('text',$this->getParentType()),
169  'parent_id' => array('integer',$this->getParentId()),
170  'operating_system_name' => array('text',$this->getOperatingSystemName()),
171  'os_min_version' => array('text',$this->getOperatingSystemMinimumVersion()),
172  'os_max_version' => array('text',$this->getOperatingSystemMaximumVersion()),
173  'browser_name' => array('text',$this->getBrowserName()),
174  'browser_minimum_version' => array('text',$this->getBrowserMinimumVersion()),
175  'browser_maximum_version' => array('text',$this->getBrowserMaximumVersion()),
176  'or_composite_id' => array('integer',$this->getOrCompositeId()));
177  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getFields() [2/2]

ilMDRequirement::__getFields ( )

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

References array, getBrowserMaximumVersion(), getBrowserMinimumVersion(), getBrowserName(), ilMDBase\getObjId(), ilMDBase\getObjType(), getOperatingSystemMaximumVersion(), getOperatingSystemMinimumVersion(), getOperatingSystemName(), getOrCompositeId(), ilMDBase\getParentId(), ilMDBase\getParentType(), ilMDBase\getRBACId(), and ilUtil\prepareDBString().

167  {
168  return array('rbac_id' => $this->getRBACId(),
169  'obj_id' => $this->getObjId(),
170  'obj_type' => ilUtil::prepareDBString($this->getObjType()),
171  'parent_type' => $this->getParentType(),
172  'parent_id' => $this->getParentId(),
173  'operating_system_name' => ilUtil::prepareDBString($this->getOperatingSystemName()),
174  'operating_system_minimum_version' => ilUtil::prepareDBString($this->getOperatingSystemMinimumVersion()),
175  'operating_system_maximum_version' => ilUtil::prepareDBString($this->getOperatingSystemMaximumVersion()),
176  'browser_name' => ilUtil::prepareDBString($this->getBrowserName()),
177  'browser_minimum_version' => ilUtil::prepareDBString($this->getBrowserMinimumVersion()),
178  'browser_maximum_version' => ilUtil::prepareDBString($this->getBrowserMaximumVersion()),
179  'or_composite_id' => $this->getOrCompositeId());
180  }
Create styles array
The data for the language used.
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
+ Here is the call graph for this function:

◆ _getIds() [1/2]

ilMDRequirement::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type,
  $a_or_composite_id = 0 
)

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

References $ilDB, $query, $res, $row, array, and ilDBConstants\FETCHMODE_OBJECT.

237  {
238  global $ilDB;
239 
240  $query = "SELECT meta_requirement_id FROM il_meta_requirement " .
241  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) . " " .
242  "AND obj_id = " . $ilDB->quote($a_obj_id) . " " .
243  "AND parent_id = " . $ilDB->quote($a_parent_id) . " " .
244  "AND parent_type = " . $ilDB->quote($a_parent_type) . " " .
245  "AND or_composite_id = " . $ilDB->quote($a_or_composite_id);
246 
247  $res = $ilDB->query($query);
248  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
249  $ids[] = $row->meta_requirement_id;
250  }
251  return $ids ? $ids : array();
252  }
foreach($_POST as $key=> $value) $res
$query
Create styles array
The data for the language used.
global $ilDB

◆ _getIds() [2/2]

static ilMDRequirement::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type,
  $a_or_composite_id = 0 
)
static

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

References $ilDB, $query, $res, $row, array, and ilDBConstants\FETCHMODE_OBJECT.

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

239  {
240  global $ilDB;
241 
242  $query = "SELECT meta_requirement_id FROM il_meta_requirement " .
243  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
244  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
245  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
246  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text') . " " .
247  "AND or_composite_id = " . $ilDB->quote($a_or_composite_id, 'integer');
248 
249  $res = $ilDB->query($query);
250  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
251  $ids[] = $row->meta_requirement_id;
252  }
253  return $ids ? $ids : array();
254  }
foreach($_POST as $key=> $value) $res
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ delete() [1/2]

ilMDRequirement::delete ( )

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

References $ilDB, $query, $res, and ilMDBase\getMetaId().

150  {
151  global $ilDB;
152 
153  if ($this->getMetaId()) {
154  $query = "DELETE FROM il_meta_requirement " .
155  "WHERE meta_requirement_id = " . $ilDB->quote($this->getMetaId(), 'integer');
156  $res = $ilDB->manipulate($query);
157  return true;
158  }
159  return false;
160  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the call graph for this function:

◆ delete() [2/2]

ilMDRequirement::delete ( )

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

References $ilDB, $query, and ilMDBase\getMetaId().

151  {
152  global $ilDB;
153 
154  if ($this->getMetaId()) {
155  $query = "DELETE FROM il_meta_requirement " .
156  "WHERE meta_requirement_id = " . $ilDB->quote($this->getMetaId());
157 
158  $this->db->query($query);
159 
160  return true;
161  }
162  return false;
163  }
$query
global $ilDB
+ Here is the call graph for this function:

◆ getBrowserMaximumVersion() [1/2]

ilMDRequirement::getBrowserMaximumVersion ( )

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

115  {
116  return $this->browser_maximum_version;
117  }

◆ getBrowserMaximumVersion() [2/2]

ilMDRequirement::getBrowserMaximumVersion ( )

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

Referenced by __getFields(), and toXML().

115  {
116  return $this->browser_maximum_version;
117  }
+ Here is the caller graph for this function:

◆ getBrowserMinimumVersion() [1/2]

ilMDRequirement::getBrowserMinimumVersion ( )

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

107  {
108  return $this->browser_minimum_version;
109  }

◆ getBrowserMinimumVersion() [2/2]

ilMDRequirement::getBrowserMinimumVersion ( )

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

Referenced by __getFields(), and toXML().

107  {
108  return $this->browser_minimum_version;
109  }
+ Here is the caller graph for this function:

◆ getBrowserName() [1/2]

ilMDRequirement::getBrowserName ( )

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

Referenced by __getFields(), and toXML().

99  {
100  return $this->browser_name;
101  }
+ Here is the caller graph for this function:

◆ getBrowserName() [2/2]

ilMDRequirement::getBrowserName ( )

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

99  {
100  return $this->browser_name;
101  }

◆ getOperatingSystemMaximumVersion() [1/2]

ilMDRequirement::getOperatingSystemMaximumVersion ( )

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

Referenced by __getFields(), and toXML().

79  {
80  return $this->operating_system_maximum_version;
81  }
+ Here is the caller graph for this function:

◆ getOperatingSystemMaximumVersion() [2/2]

ilMDRequirement::getOperatingSystemMaximumVersion ( )

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

79  {
80  return $this->operating_system_maximum_version;
81  }

◆ getOperatingSystemMinimumVersion() [1/2]

ilMDRequirement::getOperatingSystemMinimumVersion ( )

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

Referenced by __getFields(), and toXML().

71  {
72  return $this->operating_system_minimum_version;
73  }
+ Here is the caller graph for this function:

◆ getOperatingSystemMinimumVersion() [2/2]

ilMDRequirement::getOperatingSystemMinimumVersion ( )

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

71  {
72  return $this->operating_system_minimum_version;
73  }

◆ getOperatingSystemName() [1/2]

ilMDRequirement::getOperatingSystemName ( )

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

63  {
64  return $this->operating_system_name;
65  }

◆ getOperatingSystemName() [2/2]

ilMDRequirement::getOperatingSystemName ( )

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

Referenced by __getFields(), and toXML().

63  {
64  return $this->operating_system_name;
65  }
+ Here is the caller graph for this function:

◆ getOrCompositeId() [1/2]

ilMDRequirement::getOrCompositeId ( )

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

Referenced by __getFields().

41  {
42  return (int) $this->or_composite_id;
43  }
+ Here is the caller graph for this function:

◆ getOrCompositeId() [2/2]

ilMDRequirement::getOrCompositeId ( )

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

41  {
42  return (int) $this->or_composite_id;
43  }

◆ read() [1/2]

ilMDRequirement::read ( )

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

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setBrowserMaximumVersion(), setBrowserMinimumVersion(), setBrowserName(), ilMDBase\setObjId(), ilMDBase\setObjType(), setOperatingSystemMaximumVersion(), setOperatingSystemMinimumVersion(), setOperatingSystemName(), setOrCompositeId(), ilMDBase\setParentId(), ilMDBase\setParentType(), and ilMDBase\setRBACId().

180  {
181  global $ilDB;
182 
183  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
184 
185  if ($this->getMetaId()) {
186  $query = "SELECT * FROM il_meta_requirement " .
187  "WHERE meta_requirement_id = " . $ilDB->quote($this->getMetaId(), 'integer');
188 
189  $res = $this->db->query($query);
190  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
191  $this->setRBACId($row->rbac_id);
192  $this->setObjId($row->obj_id);
193  $this->setObjType($row->obj_type);
194  $this->setParentId($row->parent_id);
195  $this->setParentType($row->parent_type);
196  $this->setOperatingSystemName($row->operating_system_name);
197  $this->setOperatingSystemMinimumVersion($row->os_min_version);
198  $this->setOperatingSystemMaximumVersion($row->os_max_version);
199  $this->setBrowserName($row->browser_name);
200  $this->setBrowserMinimumVersion($row->browser_minimum_version);
201  $this->setBrowserMaximumVersion($row->browser_maximum_version);
202  $this->setOrCompositeId($row->or_composite_id);
203  }
204  }
205  return true;
206  }
setObjType($a_type)
setOperatingSystemMinimumVersion($a_val)
setOrCompositeId($a_or_composite_id)
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$query
setParentId($a_id)
setOperatingSystemMaximumVersion($a_val)
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ read() [2/2]

ilMDRequirement::read ( )

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

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setBrowserMaximumVersion(), setBrowserMinimumVersion(), setBrowserName(), ilMDBase\setObjId(), ilMDBase\setObjType(), setOperatingSystemMaximumVersion(), setOperatingSystemMinimumVersion(), setOperatingSystemName(), setOrCompositeId(), ilMDBase\setParentId(), ilMDBase\setParentType(), ilMDBase\setRBACId(), and ilUtil\stripSlashes().

183  {
184  global $ilDB;
185 
186  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
187 
188  if ($this->getMetaId()) {
189  $query = "SELECT * FROM il_meta_requirement " .
190  "WHERE meta_requirement_id = " . $ilDB->quote($this->getMetaId());
191 
192  $res = $this->db->query($query);
193  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
194  $this->setRBACId($row->rbac_id);
195  $this->setObjId($row->obj_id);
196  $this->setObjType($row->obj_type);
197  $this->setParentId($row->parent_id);
198  $this->setParentType($row->parent_type);
199  $this->setOperatingSystemName(ilUtil::stripSlashes($row->operating_system_name));
200  $this->setOperatingSystemMinimumVersion(ilUtil::stripSlashes($row->operating_system_minimum_version));
201  $this->setOperatingSystemMaximumVersion(ilUtil::stripSlashes($row->operating_system_maximum_version));
202  $this->setBrowserName(ilUtil::stripSlashes($row->browser_name));
203  $this->setBrowserMinimumVersion(ilUtil::stripSlashes($row->browser_minimum_version));
204  $this->setBrowserMaximumVersion(ilUtil::stripSlashes($row->browser_maximum_version));
205  $this->setOrCompositeId(ilUtil::stripSlashes($row->or_composite_id));
206  }
207  }
208  return true;
209  }
setObjType($a_type)
setOperatingSystemMinimumVersion($a_val)
setOrCompositeId($a_or_composite_id)
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setParentId($a_id)
setOperatingSystemMaximumVersion($a_val)
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ save() [1/2]

ilMDRequirement::save ( )

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

References ilMDBase\getMetaId(), ilDBConstants\MDB2_AUTOQUERY_INSERT, and ilMDBase\setMetaId().

120  {
121  if ($this->db->autoExecute(
122  'il_meta_requirement',
123  $this->__getFields(),
125  )) {
126  $this->setMetaId($this->db->getLastInsertId());
127 
128  return $this->getMetaId();
129  }
130  return false;
131  }
setMetaId($a_meta_id, $a_read_data=true)
+ Here is the call graph for this function:

◆ save() [2/2]

ilMDRequirement::save ( )

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

References $ilDB, __getFields(), array, ilMDBase\getMetaId(), and ilMDBase\setMetaId().

120  {
121  global $ilDB;
122 
123  $fields = $this->__getFields();
124  $fields['meta_requirement_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_requirement'));
125 
126  if ($this->db->insert('il_meta_requirement', $fields)) {
127  $this->setMetaId($next_id);
128  return $this->getMetaId();
129  }
130  return false;
131  }
setMetaId($a_meta_id, $a_read_data=true)
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ setBrowserMaximumVersion() [1/2]

ilMDRequirement::setBrowserMaximumVersion (   $a_val)

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

111  {
112  $this->browser_maximum_version = $a_val;
113  }

◆ setBrowserMaximumVersion() [2/2]

ilMDRequirement::setBrowserMaximumVersion (   $a_val)

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

Referenced by read().

111  {
112  $this->browser_maximum_version = $a_val;
113  }
+ Here is the caller graph for this function:

◆ setBrowserMinimumVersion() [1/2]

ilMDRequirement::setBrowserMinimumVersion (   $a_val)

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

103  {
104  $this->browser_minimum_version = $a_val;
105  }

◆ setBrowserMinimumVersion() [2/2]

ilMDRequirement::setBrowserMinimumVersion (   $a_val)

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

Referenced by read().

103  {
104  $this->browser_minimum_version = $a_val;
105  }
+ Here is the caller graph for this function:

◆ setBrowserName() [1/2]

ilMDRequirement::setBrowserName (   $a_val)

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

Referenced by read().

83  {
84  switch ($a_val) {
85  case 'Any':
86  case 'NetscapeCommunicator':
87  case 'MS-InternetExplorer':
88  case 'Opera':
89  case 'Amaya':
90  case 'Mozilla':
91  $this->browser_name = $a_val;
92  return true;
93 
94  default:
95  return false;
96  }
97  }
+ Here is the caller graph for this function:

◆ setBrowserName() [2/2]

ilMDRequirement::setBrowserName (   $a_val)

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

83  {
84  switch ($a_val) {
85  case 'Any':
86  case 'NetscapeCommunicator':
87  case 'MS-InternetExplorer':
88  case 'Opera':
89  case 'Amaya':
90  case 'Mozilla':
91  $this->browser_name = $a_val;
92  return true;
93 
94  default:
95  return false;
96  }
97  }

◆ setOperatingSystemMaximumVersion() [1/2]

ilMDRequirement::setOperatingSystemMaximumVersion (   $a_val)

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

Referenced by read().

75  {
76  $this->operating_system_maximum_version = $a_val;
77  }
+ Here is the caller graph for this function:

◆ setOperatingSystemMaximumVersion() [2/2]

ilMDRequirement::setOperatingSystemMaximumVersion (   $a_val)

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

75  {
76  $this->operating_system_maximum_version = $a_val;
77  }

◆ setOperatingSystemMinimumVersion() [1/2]

ilMDRequirement::setOperatingSystemMinimumVersion (   $a_val)

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

Referenced by read().

67  {
68  $this->operating_system_minimum_version = $a_val;
69  }
+ Here is the caller graph for this function:

◆ setOperatingSystemMinimumVersion() [2/2]

ilMDRequirement::setOperatingSystemMinimumVersion (   $a_val)

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

67  {
68  $this->operating_system_minimum_version = $a_val;
69  }

◆ setOperatingSystemName() [1/2]

ilMDRequirement::setOperatingSystemName (   $a_val)

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

Referenced by read().

47  {
48  switch ($a_val) {
49  case 'PC-DOS':
50  case 'MS-Windows':
51  case 'MacOS':
52  case 'Unix':
53  case 'Multi-OS':
54  case 'None':
55  $this->operating_system_name = $a_val;
56  return true;
57 
58  default:
59  return false;
60  }
61  }
+ Here is the caller graph for this function:

◆ setOperatingSystemName() [2/2]

ilMDRequirement::setOperatingSystemName (   $a_val)

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

47  {
48  switch ($a_val) {
49  case 'PC-DOS':
50  case 'MS-Windows':
51  case 'MacOS':
52  case 'Unix':
53  case 'Multi-OS':
54  case 'None':
55  $this->operating_system_name = $a_val;
56  return true;
57 
58  default:
59  return false;
60  }
61  }

◆ setOrCompositeId() [1/2]

ilMDRequirement::setOrCompositeId (   $a_or_composite_id)

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

37  {
38  $this->or_composite_id = (int) $a_or_composite_id;
39  }

◆ setOrCompositeId() [2/2]

ilMDRequirement::setOrCompositeId (   $a_or_composite_id)

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

Referenced by read().

37  {
38  $this->or_composite_id = (int) $a_or_composite_id;
39  }
+ Here is the caller graph for this function:

◆ toXML() [1/2]

ilMDRequirement::toXML ( $writer)

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

References array, getBrowserMaximumVersion(), getBrowserMinimumVersion(), getBrowserName(), getOperatingSystemMaximumVersion(), getOperatingSystemMinimumVersion(), and getOperatingSystemName().

214  {
215  $writer->xmlStartTag('Requirement');
216  $writer->xmlStartTag('Type');
217 
218  if (strlen($this->getOperatingSystemName())) {
219  $writer->xmlElement('OperatingSystem', array('Name' => $this->getOperatingSystemName()
220  ? $this->getOperatingSystemName()
221  : 'None',
222  'MinimumVersion' => $this->getOperatingSystemMinimumVersion(),
223  'MaximumVersion' => $this->getOperatingSystemMaximumVersion()));
224  }
225  if (strlen($this->getBrowserName())) {
226  $writer->xmlElement('Browser', array('Name' => $this->getBrowserName()
227  ? $this->getBrowserName()
228  : 'Any',
229  'MinimumVersion' => $this->getBrowserMinimumVersion(),
230  'MaximumVersion' => $this->getBrowserMaximumVersion()));
231  }
232  $writer->xmlEndTag('Type');
233  $writer->xmlEndTag('Requirement');
234  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ toXML() [2/2]

ilMDRequirement::toXML ( $writer)

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

References array, getBrowserMaximumVersion(), getBrowserMinimumVersion(), getBrowserName(), getOperatingSystemMaximumVersion(), getOperatingSystemMinimumVersion(), and getOperatingSystemName().

217  {
218  $writer->xmlStartTag('Requirement');
219  $writer->xmlStartTag('Type');
220 
221  if (strlen($this->getOperatingSystemName())) {
222  $writer->xmlElement('OperatingSystem', array('Name' => $this->getOperatingSystemName(),
223  'MinimumVersion' => $this->getOperatingSystemMinimumVersion(),
224  'MaximumVersion' => $this->getOperatingSystemMaximumVersion()));
225  } else {
226  $writer->xmlElement('Browser', array('Name' => $this->getBrowserName(),
227  'MinimumVersion' => $this->getBrowserMinimumVersion(),
228  'MaximumVersion' => $this->getBrowserMaximumVersion()));
229  }
230  $writer->xmlEndTag('Type');
231  $writer->xmlEndTag('Requirement');
232  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ update() [1/2]

ilMDRequirement::update ( )

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

References $ilDB, array, and ilMDBase\getMetaId().

134  {
135  global $ilDB;
136 
137  if ($this->getMetaId()) {
138  if ($this->db->update(
139  'il_meta_requirement',
140  $this->__getFields(),
141  array("meta_requirement_id" => array('integer',$this->getMetaId()))
142  )) {
143  return true;
144  }
145  }
146  return false;
147  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ update() [2/2]

ilMDRequirement::update ( )

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

References $ilDB, ilMDBase\getMetaId(), and ilDBConstants\MDB2_AUTOQUERY_UPDATE.

134  {
135  global $ilDB;
136 
137  if ($this->getMetaId()) {
138  if ($this->db->autoExecute(
139  'il_meta_requirement',
140  $this->__getFields(),
142  "meta_requirement_id = " . $ilDB->quote($this->getMetaId())
143  )) {
144  return true;
145  }
146  }
147  return false;
148  }
global $ilDB
+ Here is the call graph for this function:

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