ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 167 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().

168  {
169  return array('rbac_id' => array('integer',$this->getRBACId()),
170  'obj_id' => array('integer',$this->getObjId()),
171  'obj_type' => array('text',$this->getObjType()),
172  'parent_type' => array('text',$this->getParentType()),
173  'parent_id' => array('integer',$this->getParentId()),
174  'operating_system_name' => array('text',$this->getOperatingSystemName()),
175  'os_min_version' => array('text',$this->getOperatingSystemMinimumVersion()),
176  'os_max_version' => array('text',$this->getOperatingSystemMaximumVersion()),
177  'browser_name' => array('text',$this->getBrowserName()),
178  'browser_minimum_version' => array('text',$this->getBrowserMinimumVersion()),
179  'browser_maximum_version' => array('text',$this->getBrowserMaximumVersion()),
180  'or_composite_id' => array('integer',$this->getOrCompositeId()));
181  }
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 168 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().

169  {
170  return array('rbac_id' => $this->getRBACId(),
171  'obj_id' => $this->getObjId(),
172  'obj_type' => ilUtil::prepareDBString($this->getObjType()),
173  'parent_type' => $this->getParentType(),
174  'parent_id' => $this->getParentId(),
175  'operating_system_name' => ilUtil::prepareDBString($this->getOperatingSystemName()),
176  'operating_system_minimum_version' => ilUtil::prepareDBString($this->getOperatingSystemMinimumVersion()),
177  'operating_system_maximum_version' => ilUtil::prepareDBString($this->getOperatingSystemMaximumVersion()),
178  'browser_name' => ilUtil::prepareDBString($this->getBrowserName()),
179  'browser_minimum_version' => ilUtil::prepareDBString($this->getBrowserMinimumVersion()),
180  'browser_maximum_version' => ilUtil::prepareDBString($this->getBrowserMaximumVersion()),
181  'or_composite_id' => $this->getOrCompositeId());
182  }
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 244 of file class.ilMDRequirement.php.

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

245  {
246  global $ilDB;
247 
248  $query = "SELECT meta_requirement_id FROM il_meta_requirement ".
249  "WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
250  "AND obj_id = ".$ilDB->quote($a_obj_id)." ".
251  "AND parent_id = ".$ilDB->quote($a_parent_id)." ".
252  "AND parent_type = ".$ilDB->quote($a_parent_type)." ".
253  "AND or_composite_id = ".$ilDB->quote($a_or_composite_id);
254 
255  $res = $ilDB->query($query);
256  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
257  {
258  $ids[] = $row->meta_requirement_id;
259  }
260  return $ids ? $ids : array();
261  }
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 247 of file class.ilMDRequirement.php.

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

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

248  {
249  global $ilDB;
250 
251  $query = "SELECT meta_requirement_id FROM il_meta_requirement ".
252  "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
253  "AND obj_id = ".$ilDB->quote($a_obj_id ,'integer')." ".
254  "AND parent_id = ".$ilDB->quote($a_parent_id ,'integer')." ".
255  "AND parent_type = ".$ilDB->quote($a_parent_type ,'text')." ".
256  "AND or_composite_id = ".$ilDB->quote($a_or_composite_id ,'integer');
257 
258  $res = $ilDB->query($query);
259  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
260  {
261  $ids[] = $row->meta_requirement_id;
262  }
263  return $ids ? $ids : array();
264  }
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 151 of file class.ilMDRequirement.php.

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

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

◆ delete() [2/2]

ilMDRequirement::delete ( )

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

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

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

◆ getBrowserMaximumVersion() [1/2]

ilMDRequirement::getBrowserMaximumVersion ( )

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

117  {
118  return $this->browser_maximum_version;
119  }

◆ getBrowserMaximumVersion() [2/2]

ilMDRequirement::getBrowserMaximumVersion ( )

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

Referenced by __getFields(), and toXML().

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

◆ getBrowserMinimumVersion() [1/2]

ilMDRequirement::getBrowserMinimumVersion ( )

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

109  {
110  return $this->browser_minimum_version;
111  }

◆ getBrowserMinimumVersion() [2/2]

ilMDRequirement::getBrowserMinimumVersion ( )

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

Referenced by __getFields(), and toXML().

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

◆ getBrowserName() [1/2]

ilMDRequirement::getBrowserName ( )

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

Referenced by __getFields(), and toXML().

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

◆ getBrowserName() [2/2]

ilMDRequirement::getBrowserName ( )

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

101  {
102  return $this->browser_name;
103  }

◆ getOperatingSystemMaximumVersion() [1/2]

ilMDRequirement::getOperatingSystemMaximumVersion ( )

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

Referenced by __getFields(), and toXML().

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

◆ getOperatingSystemMaximumVersion() [2/2]

ilMDRequirement::getOperatingSystemMaximumVersion ( )

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

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

◆ getOperatingSystemMinimumVersion() [1/2]

ilMDRequirement::getOperatingSystemMinimumVersion ( )

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

Referenced by __getFields(), and toXML().

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

◆ getOperatingSystemMinimumVersion() [2/2]

ilMDRequirement::getOperatingSystemMinimumVersion ( )

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

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

◆ getOperatingSystemName() [1/2]

ilMDRequirement::getOperatingSystemName ( )

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

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

◆ getOperatingSystemName() [2/2]

ilMDRequirement::getOperatingSystemName ( )

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

Referenced by __getFields(), and toXML().

64  {
65  return $this->operating_system_name;
66  }
+ 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 183 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().

184  {
185  global $ilDB;
186 
187  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
188 
189  if($this->getMetaId())
190  {
191  $query = "SELECT * FROM il_meta_requirement ".
192  "WHERE meta_requirement_id = ".$ilDB->quote($this->getMetaId() ,'integer');
193 
194  $res = $this->db->query($query);
195  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
196  {
197  $this->setRBACId($row->rbac_id);
198  $this->setObjId($row->obj_id);
199  $this->setObjType($row->obj_type);
200  $this->setParentId($row->parent_id);
201  $this->setParentType($row->parent_type);
202  $this->setOperatingSystemName($row->operating_system_name);
203  $this->setOperatingSystemMinimumVersion($row->os_min_version);
204  $this->setOperatingSystemMaximumVersion($row->os_max_version);
205  $this->setBrowserName($row->browser_name);
206  $this->setBrowserMinimumVersion($row->browser_minimum_version);
207  $this->setBrowserMaximumVersion($row->browser_maximum_version);
208  $this->setOrCompositeId($row->or_composite_id);
209  }
210  }
211  return true;
212  }
setObjType($a_type)
setOperatingSystemMinimumVersion($a_val)
setOrCompositeId($a_or_composite_id)
setObjId($a_id)
setRBACId($a_id)
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 184 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().

185  {
186  global $ilDB;
187 
188  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
189 
190  if($this->getMetaId())
191  {
192  $query = "SELECT * FROM il_meta_requirement ".
193  "WHERE meta_requirement_id = ".$ilDB->quote($this->getMetaId());
194 
195  $res = $this->db->query($query);
196  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
197  {
198  $this->setRBACId($row->rbac_id);
199  $this->setObjId($row->obj_id);
200  $this->setObjType($row->obj_type);
201  $this->setParentId($row->parent_id);
202  $this->setParentType($row->parent_type);
203  $this->setOperatingSystemName(ilUtil::stripSlashes($row->operating_system_name));
204  $this->setOperatingSystemMinimumVersion(ilUtil::stripSlashes($row->operating_system_minimum_version));
205  $this->setOperatingSystemMaximumVersion(ilUtil::stripSlashes($row->operating_system_maximum_version));
206  $this->setBrowserName(ilUtil::stripSlashes($row->browser_name));
207  $this->setBrowserMinimumVersion(ilUtil::stripSlashes($row->browser_minimum_version));
208  $this->setBrowserMaximumVersion(ilUtil::stripSlashes($row->browser_maximum_version));
209  $this->setOrCompositeId(ilUtil::stripSlashes($row->or_composite_id));
210  }
211  }
212  return true;
213  }
setObjType($a_type)
setOperatingSystemMinimumVersion($a_val)
setOrCompositeId($a_or_composite_id)
setObjId($a_id)
setRBACId($a_id)
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 121 of file class.ilMDRequirement.php.

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

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

◆ save() [2/2]

ilMDRequirement::save ( )

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

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

122  {
123  global $ilDB;
124 
125  $fields = $this->__getFields();
126  $fields['meta_requirement_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_requirement'));
127 
128  if($this->db->insert('il_meta_requirement',$fields))
129  {
130  $this->setMetaId($next_id);
131  return $this->getMetaId();
132  }
133  return false;
134  }
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 112 of file class.ilMDRequirement.php.

113  {
114  $this->browser_maximum_version = $a_val;
115  }

◆ setBrowserMaximumVersion() [2/2]

ilMDRequirement::setBrowserMaximumVersion (   $a_val)

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

Referenced by read().

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

◆ setBrowserMinimumVersion() [1/2]

ilMDRequirement::setBrowserMinimumVersion (   $a_val)

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

105  {
106  $this->browser_minimum_version = $a_val;
107  }

◆ setBrowserMinimumVersion() [2/2]

ilMDRequirement::setBrowserMinimumVersion (   $a_val)

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

Referenced by read().

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

◆ setBrowserName() [1/2]

ilMDRequirement::setBrowserName (   $a_val)

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

Referenced by read().

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

◆ setBrowserName() [2/2]

ilMDRequirement::setBrowserName (   $a_val)

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

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

◆ setOperatingSystemMaximumVersion() [1/2]

ilMDRequirement::setOperatingSystemMaximumVersion (   $a_val)

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

Referenced by read().

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

◆ setOperatingSystemMaximumVersion() [2/2]

ilMDRequirement::setOperatingSystemMaximumVersion (   $a_val)

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

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

◆ setOperatingSystemMinimumVersion() [1/2]

ilMDRequirement::setOperatingSystemMinimumVersion (   $a_val)

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

Referenced by read().

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

◆ setOperatingSystemMinimumVersion() [2/2]

ilMDRequirement::setOperatingSystemMinimumVersion (   $a_val)

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

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

◆ 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  {
50  case 'PC-DOS':
51  case 'MS-Windows':
52  case 'MacOS':
53  case 'Unix':
54  case 'Multi-OS':
55  case 'None':
56  $this->operating_system_name = $a_val;
57  return true;
58 
59  default:
60  return false;
61  }
62  }
+ 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  {
50  case 'PC-DOS':
51  case 'MS-Windows':
52  case 'MacOS':
53  case 'Unix':
54  case 'Multi-OS':
55  case 'None':
56  $this->operating_system_name = $a_val;
57  return true;
58 
59  default:
60  return false;
61  }
62  }

◆ 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 219 of file class.ilMDRequirement.php.

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

220  {
221  $writer->xmlStartTag('Requirement');
222  $writer->xmlStartTag('Type');
223 
224  if(strlen($this->getOperatingSystemName()))
225  {
226  $writer->xmlElement('OperatingSystem',array('Name' => $this->getOperatingSystemName()
227  ? $this->getOperatingSystemName()
228  : 'None',
229  'MinimumVersion' => $this->getOperatingSystemMinimumVersion(),
230  'MaximumVersion' => $this->getOperatingSystemMaximumVersion()));
231  }
232  if(strlen($this->getBrowserName()))
233  {
234  $writer->xmlElement('Browser',array('Name' => $this->getBrowserName()
235  ? $this->getBrowserName()
236  : 'Any',
237  'MinimumVersion' => $this->getBrowserMinimumVersion(),
238  'MaximumVersion' => $this->getBrowserMaximumVersion()));
239  }
240  $writer->xmlEndTag('Type');
241  $writer->xmlEndTag('Requirement');
242 
243  }
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 220 of file class.ilMDRequirement.php.

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

221  {
222  $writer->xmlStartTag('Requirement');
223  $writer->xmlStartTag('Type');
224 
225  if(strlen($this->getOperatingSystemName()))
226  {
227  $writer->xmlElement('OperatingSystem',array('Name' => $this->getOperatingSystemName(),
228  'MinimumVersion' => $this->getOperatingSystemMinimumVersion(),
229  'MaximumVersion' => $this->getOperatingSystemMaximumVersion()));
230  }
231  else
232  {
233  $writer->xmlElement('Browser',array('Name' => $this->getBrowserName(),
234  'MinimumVersion' => $this->getBrowserMinimumVersion(),
235  'MaximumVersion' => $this->getBrowserMaximumVersion()));
236  }
237  $writer->xmlEndTag('Type');
238  $writer->xmlEndTag('Requirement');
239 
240  }
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 134 of file class.ilMDRequirement.php.

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

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

◆ update() [2/2]

ilMDRequirement::update ( )

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

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

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

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