ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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)
 
 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)
 
- 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)
 
 __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 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type, $a_or_composite_id=0)
 
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/3]

ilMDRequirement::__getFields ( )

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

References 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  }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
+ Here is the call graph for this function:

◆ __getFields() [2/3]

ilMDRequirement::__getFields ( )

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

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

Referenced by save().

170  {
171  return array('rbac_id' => array('integer',$this->getRBACId()),
172  'obj_id' => array('integer',$this->getObjId()),
173  'obj_type' => array('text',$this->getObjType()),
174  'parent_type' => array('text',$this->getParentType()),
175  'parent_id' => array('integer',$this->getParentId()),
176  'operating_system_name' => array('text',$this->getOperatingSystemName()),
177  'os_min_version' => array('text',$this->getOperatingSystemMinimumVersion()),
178  'os_max_version' => array('text',$this->getOperatingSystemMaximumVersion()),
179  'browser_name' => array('text',$this->getBrowserName()),
180  'browser_minimum_version' => array('text',$this->getBrowserMinimumVersion()),
181  'browser_maximum_version' => array('text',$this->getBrowserMaximumVersion()),
182  'or_composite_id' => array('integer',$this->getOrCompositeId()));
183  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getFields() [3/3]

ilMDRequirement::__getFields ( )

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

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

170  {
171  return array('rbac_id' => array('integer',$this->getRBACId()),
172  'obj_id' => array('integer',$this->getObjId()),
173  'obj_type' => array('text',$this->getObjType()),
174  'parent_type' => array('text',$this->getParentType()),
175  'parent_id' => array('integer',$this->getParentId()),
176  'operating_system_name' => array('text',$this->getOperatingSystemName()),
177  'os_min_version' => array('text',$this->getOperatingSystemMinimumVersion()),
178  'os_max_version' => array('text',$this->getOperatingSystemMaximumVersion()),
179  'browser_name' => array('text',$this->getBrowserName()),
180  'browser_minimum_version' => array('text',$this->getBrowserMinimumVersion()),
181  'browser_maximum_version' => array('text',$this->getBrowserMaximumVersion()),
182  'or_composite_id' => array('integer',$this->getOrCompositeId()));
183  }
+ Here is the call graph for this function:

◆ _getIds() [1/3]

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, 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
$row
global $ilDB

◆ _getIds() [2/3]

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

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

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

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

247  {
248  global $DIC;
249 
250  $ilDB = $DIC['ilDB'];
251 
252  $query = "SELECT meta_requirement_id FROM il_meta_requirement " .
253  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
254  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
255  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
256  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text') . " " .
257  "AND or_composite_id = " . $ilDB->quote($a_or_composite_id, 'integer');
258 
259  $res = $ilDB->query($query);
260  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
261  $ids[] = $row->meta_requirement_id;
262  }
263  return $ids ? $ids : array();
264  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the caller graph for this function:

◆ _getIds() [3/3]

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

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

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

247  {
248  global $DIC;
249 
250  $ilDB = $DIC['ilDB'];
251 
252  $query = "SELECT meta_requirement_id FROM il_meta_requirement " .
253  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
254  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
255  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
256  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text') . " " .
257  "AND or_composite_id = " . $ilDB->quote($a_or_composite_id, 'integer');
258 
259  $res = $ilDB->query($query);
260  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
261  $ids[] = $row->meta_requirement_id;
262  }
263  return $ids ? $ids : array();
264  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ delete() [1/3]

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:

◆ delete() [2/3]

ilMDRequirement::delete ( )

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

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

154  {
155  global $DIC;
156 
157  $ilDB = $DIC['ilDB'];
158 
159  if ($this->getMetaId()) {
160  $query = "DELETE FROM il_meta_requirement " .
161  "WHERE meta_requirement_id = " . $ilDB->quote($this->getMetaId(), 'integer');
162  $res = $ilDB->manipulate($query);
163  return true;
164  }
165  return false;
166  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the call graph for this function:

◆ delete() [3/3]

ilMDRequirement::delete ( )

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

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

154  {
155  global $DIC;
156 
157  $ilDB = $DIC['ilDB'];
158 
159  if ($this->getMetaId()) {
160  $query = "DELETE FROM il_meta_requirement " .
161  "WHERE meta_requirement_id = " . $ilDB->quote($this->getMetaId(), 'integer');
162  $res = $ilDB->manipulate($query);
163  return true;
164  }
165  return false;
166  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the call graph for this function:

◆ getBrowserMaximumVersion() [1/3]

ilMDRequirement::getBrowserMaximumVersion ( )

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

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

◆ getBrowserMaximumVersion() [2/3]

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:

◆ getBrowserMaximumVersion() [3/3]

ilMDRequirement::getBrowserMaximumVersion ( )

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

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

◆ getBrowserMinimumVersion() [1/3]

ilMDRequirement::getBrowserMinimumVersion ( )

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

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

◆ getBrowserMinimumVersion() [2/3]

ilMDRequirement::getBrowserMinimumVersion ( )

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

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

◆ getBrowserMinimumVersion() [3/3]

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/3]

ilMDRequirement::getBrowserName ( )

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

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

◆ getBrowserName() [2/3]

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() [3/3]

ilMDRequirement::getBrowserName ( )

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

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

◆ getOperatingSystemMaximumVersion() [1/3]

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/3]

ilMDRequirement::getOperatingSystemMaximumVersion ( )

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

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

◆ getOperatingSystemMaximumVersion() [3/3]

ilMDRequirement::getOperatingSystemMaximumVersion ( )

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

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

◆ getOperatingSystemMinimumVersion() [1/3]

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/3]

ilMDRequirement::getOperatingSystemMinimumVersion ( )

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

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

◆ getOperatingSystemMinimumVersion() [3/3]

ilMDRequirement::getOperatingSystemMinimumVersion ( )

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

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

◆ getOperatingSystemName() [1/3]

ilMDRequirement::getOperatingSystemName ( )

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

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

◆ getOperatingSystemName() [2/3]

ilMDRequirement::getOperatingSystemName ( )

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

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

◆ getOperatingSystemName() [3/3]

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/3]

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/3]

ilMDRequirement::getOrCompositeId ( )

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

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

◆ getOrCompositeId() [3/3]

ilMDRequirement::getOrCompositeId ( )

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

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

◆ read() [1/3]

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)
$row
setOperatingSystemMaximumVersion($a_val)
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ read() [2/3]

ilMDRequirement::read ( )

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

References $DIC, $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().

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

◆ read() [3/3]

ilMDRequirement::read ( )

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

References $DIC, $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().

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

◆ save() [1/3]

ilMDRequirement::save ( )

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

References ilDBConstants\AUTOQUERY_INSERT, ilMDBase\getMetaId(), 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/3]

ilMDRequirement::save ( )

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

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

120  {
121  global $DIC;
122 
123  $ilDB = $DIC['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  $this->setMetaId($next_id);
130  return $this->getMetaId();
131  }
132  return false;
133  }
global $DIC
Definition: saml.php:7
setMetaId($a_meta_id, $a_read_data=true)
global $ilDB
+ Here is the call graph for this function:

◆ save() [3/3]

ilMDRequirement::save ( )

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

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

120  {
121  global $DIC;
122 
123  $ilDB = $DIC['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  $this->setMetaId($next_id);
130  return $this->getMetaId();
131  }
132  return false;
133  }
global $DIC
Definition: saml.php:7
setMetaId($a_meta_id, $a_read_data=true)
global $ilDB
+ Here is the call graph for this function:

◆ setBrowserMaximumVersion() [1/3]

ilMDRequirement::setBrowserMaximumVersion (   $a_val)

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

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

◆ setBrowserMaximumVersion() [2/3]

ilMDRequirement::setBrowserMaximumVersion (   $a_val)

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

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

◆ setBrowserMaximumVersion() [3/3]

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/3]

ilMDRequirement::setBrowserMinimumVersion (   $a_val)

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

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

◆ setBrowserMinimumVersion() [2/3]

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:

◆ setBrowserMinimumVersion() [3/3]

ilMDRequirement::setBrowserMinimumVersion (   $a_val)

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

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

◆ setBrowserName() [1/3]

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  }

◆ setBrowserName() [2/3]

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() [3/3]

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/3]

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/3]

ilMDRequirement::setOperatingSystemMaximumVersion (   $a_val)

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

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

◆ setOperatingSystemMaximumVersion() [3/3]

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/3]

ilMDRequirement::setOperatingSystemMinimumVersion (   $a_val)

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

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

◆ setOperatingSystemMinimumVersion() [2/3]

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() [3/3]

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/3]

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  }

◆ setOperatingSystemName() [2/3]

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  }

◆ setOperatingSystemName() [3/3]

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:

◆ setOrCompositeId() [1/3]

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:

◆ setOrCompositeId() [2/3]

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() [3/3]

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  }

◆ toXML() [1/3]

ilMDRequirement::toXML ( $writer)

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

References 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  }
+ Here is the call graph for this function:

◆ toXML() [2/3]

ilMDRequirement::toXML ( $writer)

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

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

222  {
223  $writer->xmlStartTag('Requirement');
224  $writer->xmlStartTag('Type');
225 
226  if (strlen($this->getOperatingSystemName())) {
227  $writer->xmlElement('OperatingSystem', array('Name' => $this->getOperatingSystemName()
228  ? $this->getOperatingSystemName()
229  : 'None',
230  'MinimumVersion' => $this->getOperatingSystemMinimumVersion(),
231  'MaximumVersion' => $this->getOperatingSystemMaximumVersion()));
232  }
233  if (strlen($this->getBrowserName())) {
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  }
+ Here is the call graph for this function:

◆ toXML() [3/3]

ilMDRequirement::toXML ( $writer)

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

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

222  {
223  $writer->xmlStartTag('Requirement');
224  $writer->xmlStartTag('Type');
225 
226  if (strlen($this->getOperatingSystemName())) {
227  $writer->xmlElement('OperatingSystem', array('Name' => $this->getOperatingSystemName()
228  ? $this->getOperatingSystemName()
229  : 'None',
230  'MinimumVersion' => $this->getOperatingSystemMinimumVersion(),
231  'MaximumVersion' => $this->getOperatingSystemMaximumVersion()));
232  }
233  if (strlen($this->getBrowserName())) {
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  }
+ Here is the call graph for this function:

◆ update() [1/3]

ilMDRequirement::update ( )

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

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

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:

◆ update() [2/3]

ilMDRequirement::update ( )

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

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

136  {
137  global $DIC;
138 
139  $ilDB = $DIC['ilDB'];
140 
141  if ($this->getMetaId()) {
142  if ($this->db->update(
143  'il_meta_requirement',
144  $this->__getFields(),
145  array("meta_requirement_id" => array('integer',$this->getMetaId()))
146  )) {
147  return true;
148  }
149  }
150  return false;
151  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ update() [3/3]

ilMDRequirement::update ( )

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

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

136  {
137  global $DIC;
138 
139  $ilDB = $DIC['ilDB'];
140 
141  if ($this->getMetaId()) {
142  if ($this->db->update(
143  'il_meta_requirement',
144  $this->__getFields(),
145  array("meta_requirement_id" => array('integer',$this->getMetaId()))
146  )) {
147  return true;
148  }
149  }
150  return false;
151  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

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