ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMDIdentifier Class Reference
+ Inheritance diagram for ilMDIdentifier:
+ Collaboration diagram for ilMDIdentifier:

Public Member Functions

 setCatalog ($a_catalog)
 
 getCatalog ()
 
 setEntry ($a_entry)
 
 getEntry ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer, $a_overwrite_id=false)
 
 setCatalog ($a_catalog)
 
 getCatalog ()
 
 setEntry ($a_entry)
 
 getEntry ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
 
 setCatalog ($a_catalog)
 
 getCatalog ()
 
 setEntry ($a_entry)
 
 getEntry ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer, $a_overwrite_id=false)
 
- 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)
 
static _getEntriesForObj ($a_rbac_id, $a_obj_id, $a_obj_type)
 Get IDs for an object. More...
 
static _getEntriesForRbacObj ($a_rbac_id, $a_obj_type="")
 Get IDs for an rbac object. More...
 
static existsIdInRbacObject ($a_rbac_id, $a_obj_type, $a_catalog, $a_entry)
 Does id entry exist in rbac object? More...
 
static readIdData ($a_rbac_id, $a_obj_type, $a_catalog, $a_entry)
 Does id entry exist in rbac object? More...
 
static _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
 
static _getEntriesForObj ($a_rbac_id, $a_obj_id, $a_obj_type)
 Get IDs for an object. More...
 
static _getEntriesForRbacObj ($a_rbac_id, $a_obj_type="")
 Get IDs for an rbac object. More...
 
static existsIdInRbacObject ($a_rbac_id, $a_obj_type, $a_catalog, $a_entry)
 Does id entry exist in rbac object? More...
 
static readIdData ($a_rbac_id, $a_obj_type, $a_catalog, $a_entry)
 Does id entry exist in rbac object? More...
 

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 32 of file class.ilMDIdentifier.php.

Member Function Documentation

◆ __getFields() [1/3]

ilMDIdentifier::__getFields ( )

Definition at line 101 of file class.ilMDIdentifier.php.

References getCatalog(), getEntry(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getParentId(), ilMDBase\getParentType(), ilMDBase\getRBACId(), and ilUtil\prepareDBString().

102  {
103  return array('rbac_id' => $this->getRBACId(),
104  'obj_id' => $this->getObjId(),
105  'obj_type' => ilUtil::prepareDBString($this->getObjType()),
106  'parent_type' => $this->getParentType(),
107  'parent_id' => $this->getParentId(),
108  'catalog' => ilUtil::prepareDBString($this->getCatalog()),
109  'entry' => ilUtil::prepareDBString($this->getEntry()));
110  }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
+ Here is the call graph for this function:

◆ __getFields() [2/3]

ilMDIdentifier::__getFields ( )

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

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

Referenced by save().

105  {
106  return array('rbac_id' => array('integer',$this->getRBACId()),
107  'obj_id' => array('integer',$this->getObjId()),
108  'obj_type' => array('text',$this->getObjType()),
109  'parent_type' => array('text',$this->getParentType()),
110  'parent_id' => array('integer',$this->getParentId()),
111  'catalog' => array('text',$this->getCatalog()),
112  'entry' => array('text',$this->getEntry()));
113  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getFields() [3/3]

ilMDIdentifier::__getFields ( )

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

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

105  {
106  return array('rbac_id' => array('integer',$this->getRBACId()),
107  'obj_id' => array('integer',$this->getObjId()),
108  'obj_type' => array('text',$this->getObjType()),
109  'parent_type' => array('text',$this->getParentType()),
110  'parent_id' => array('integer',$this->getParentId()),
111  'catalog' => array('text',$this->getCatalog()),
112  'entry' => array('text',$this->getEntry()));
113  }
+ Here is the call graph for this function:

◆ _getEntriesForObj() [1/2]

static ilMDIdentifier::_getEntriesForObj (   $a_rbac_id,
  $a_obj_id,
  $a_obj_type 
)
static

Get IDs for an object.

Parameters

Definition at line 193 of file class.ilMDIdentifier.php.

References $DIC, $ilDB, $query, $r, and $res.

194  {
195  global $DIC;
196 
197  $ilDB = $DIC['ilDB'];
198 
199  $query = "SELECT meta_identifier_id, catalog, entry FROM il_meta_identifier " .
200  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
201  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
202  "AND obj_type = " . $ilDB->quote($a_obj_type, 'text');
203 
204  $res = $ilDB->query($query);
205  $entries = array();
206  while ($r = $ilDB->fetchAssoc($res)) {
207  $entries[$r["meta_identifier_id"]] =
208  array("catalog" => $r["catalog"],
209  "entry" => $r["entry"]);
210  }
211  return $entries;
212  }
global $DIC
Definition: saml.php:7
$r
Definition: example_031.php:79
foreach($_POST as $key=> $value) $res
$query
global $ilDB

◆ _getEntriesForObj() [2/2]

static ilMDIdentifier::_getEntriesForObj (   $a_rbac_id,
  $a_obj_id,
  $a_obj_type 
)
static

Get IDs for an object.

Parameters

Definition at line 193 of file class.ilMDIdentifier.php.

References $DIC, $ilDB, $query, $r, and $res.

Referenced by ilLMObject\getExportId(), and ilLMObject\saveExportId().

194  {
195  global $DIC;
196 
197  $ilDB = $DIC['ilDB'];
198 
199  $query = "SELECT meta_identifier_id, catalog, entry FROM il_meta_identifier " .
200  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
201  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
202  "AND obj_type = " . $ilDB->quote($a_obj_type, 'text');
203 
204  $res = $ilDB->query($query);
205  $entries = array();
206  while ($r = $ilDB->fetchAssoc($res)) {
207  $entries[$r["meta_identifier_id"]] =
208  array("catalog" => $r["catalog"],
209  "entry" => $r["entry"]);
210  }
211  return $entries;
212  }
global $DIC
Definition: saml.php:7
$r
Definition: example_031.php:79
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _getEntriesForRbacObj() [1/2]

static ilMDIdentifier::_getEntriesForRbacObj (   $a_rbac_id,
  $a_obj_type = "" 
)
static

Get IDs for an rbac object.

Parameters

Definition at line 220 of file class.ilMDIdentifier.php.

References $DIC, $ilDB, $query, $r, and $res.

221  {
222  global $DIC;
223 
224  $ilDB = $DIC['ilDB'];
225 
226  $query = "SELECT meta_identifier_id, catalog, entry, obj_id FROM il_meta_identifier " .
227  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer');
228 
229  if ($a_obj_type != "") {
230  $query .=
231  " AND obj_type = " . $ilDB->quote($a_obj_type, 'text');
232  }
233 
234  $res = $ilDB->query($query);
235  $entries = array();
236  while ($r = $ilDB->fetchAssoc($res)) {
237  $entries[$r["meta_identifier_id"]] =
238  array("catalog" => $r["catalog"],
239  "entry" => $r["entry"],
240  "obj_id" => $r["obj_id"]);
241  }
242  return $entries;
243  }
global $DIC
Definition: saml.php:7
$r
Definition: example_031.php:79
foreach($_POST as $key=> $value) $res
$query
global $ilDB

◆ _getEntriesForRbacObj() [2/2]

static ilMDIdentifier::_getEntriesForRbacObj (   $a_rbac_id,
  $a_obj_type = "" 
)
static

Get IDs for an rbac object.

Parameters

Definition at line 220 of file class.ilMDIdentifier.php.

References $DIC, $ilDB, $query, $r, and $res.

Referenced by ilLMObject\getDuplicateExportIDs().

221  {
222  global $DIC;
223 
224  $ilDB = $DIC['ilDB'];
225 
226  $query = "SELECT meta_identifier_id, catalog, entry, obj_id FROM il_meta_identifier " .
227  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer');
228 
229  if ($a_obj_type != "") {
230  $query .=
231  " AND obj_type = " . $ilDB->quote($a_obj_type, 'text');
232  }
233 
234  $res = $ilDB->query($query);
235  $entries = array();
236  while ($r = $ilDB->fetchAssoc($res)) {
237  $entries[$r["meta_identifier_id"]] =
238  array("catalog" => $r["catalog"],
239  "entry" => $r["entry"],
240  "obj_id" => $r["obj_id"]);
241  }
242  return $entries;
243  }
global $DIC
Definition: saml.php:7
$r
Definition: example_031.php:79
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _getIds() [1/3]

ilMDIdentifier::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)

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

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

148  {
149  global $ilDB;
150 
151  $query = "SELECT meta_identifier_id FROM il_meta_identifier " .
152  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) . " " .
153  "AND obj_id = " . $ilDB->quote($a_obj_id) . " " .
154  "AND parent_id = " . $ilDB->quote($a_parent_id) . " " .
155  "AND parent_type = " . $ilDB->quote($a_parent_type);
156 
157 
158  $res = $ilDB->query($query);
159  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
160  $ids[] = $row->meta_identifier_id;
161  }
162  return $ids ? $ids : array();
163  }
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ _getIds() [2/3]

static ilMDIdentifier::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)
static

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

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

169  {
170  global $DIC;
171 
172  $ilDB = $DIC['ilDB'];
173 
174  $query = "SELECT meta_identifier_id FROM il_meta_identifier " .
175  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
176  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
177  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
178  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text');
179 
180  $res = $ilDB->query($query);
181  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
182  $ids[] = $row->meta_identifier_id;
183  }
184  return $ids ? $ids : array();
185  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ _getIds() [3/3]

static ilMDIdentifier::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)
static

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

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

Referenced by ilMDMetaMetadata\getIdentifierIds(), and ilMDGeneral\getIdentifierIds().

169  {
170  global $DIC;
171 
172  $ilDB = $DIC['ilDB'];
173 
174  $query = "SELECT meta_identifier_id FROM il_meta_identifier " .
175  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
176  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
177  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
178  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text');
179 
180  $res = $ilDB->query($query);
181  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
182  $ids[] = $row->meta_identifier_id;
183  }
184  return $ids ? $ids : array();
185  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the caller graph for this function:

◆ delete() [1/3]

ilMDIdentifier::delete ( )

Definition at line 85 of file class.ilMDIdentifier.php.

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

86  {
87  global $ilDB;
88 
89  if ($this->getMetaId()) {
90  $query = "DELETE FROM il_meta_identifier " .
91  "WHERE meta_identifier_id = " . $ilDB->quote($this->getMetaId());
92 
93  $this->db->query($query);
94 
95  return true;
96  }
97  return false;
98  }
$query
global $ilDB
+ Here is the call graph for this function:

◆ delete() [2/3]

ilMDIdentifier::delete ( )

Definition at line 88 of file class.ilMDIdentifier.php.

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

89  {
90  global $DIC;
91 
92  $ilDB = $DIC['ilDB'];
93 
94  if ($this->getMetaId()) {
95  $query = "DELETE FROM il_meta_identifier " .
96  "WHERE meta_identifier_id = " . $ilDB->quote($this->getMetaId(), 'integer');
97  $res = $ilDB->manipulate($query);
98  return true;
99  }
100  return false;
101  }
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]

ilMDIdentifier::delete ( )

Definition at line 88 of file class.ilMDIdentifier.php.

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

89  {
90  global $DIC;
91 
92  $ilDB = $DIC['ilDB'];
93 
94  if ($this->getMetaId()) {
95  $query = "DELETE FROM il_meta_identifier " .
96  "WHERE meta_identifier_id = " . $ilDB->quote($this->getMetaId(), 'integer');
97  $res = $ilDB->manipulate($query);
98  return true;
99  }
100  return false;
101  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the call graph for this function:

◆ existsIdInRbacObject() [1/2]

static ilMDIdentifier::existsIdInRbacObject (   $a_rbac_id,
  $a_obj_type,
  $a_catalog,
  $a_entry 
)
static

Does id entry exist in rbac object?

Parameters

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

References $DIC, $ilDB, $query, $r, and $s.

252  {
253  global $DIC;
254 
255  $ilDB = $DIC['ilDB'];
256 
257  $query = "SELECT meta_identifier_id, obj_id FROM il_meta_identifier " .
258  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') .
259  " AND obj_type = " . $ilDB->quote($a_obj_type, 'text') .
260  " AND catalog = " . $ilDB->quote($a_catalog, 'text') .
261  " AND entry = " . $ilDB->quote($a_entry, 'text');
262  $s = $ilDB->query($query);
263  if ($r = $ilDB->fetchAssoc($s)) {
264  return true;
265  }
266  return false;
267  }
global $DIC
Definition: saml.php:7
$s
Definition: pwgen.php:45
$r
Definition: example_031.php:79
$query
global $ilDB

◆ existsIdInRbacObject() [2/2]

static ilMDIdentifier::existsIdInRbacObject (   $a_rbac_id,
  $a_obj_type,
  $a_catalog,
  $a_entry 
)
static

Does id entry exist in rbac object?

Parameters

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

References $DIC, $ilDB, $query, $r, and $s.

Referenced by ilLMObject\existsExportID().

252  {
253  global $DIC;
254 
255  $ilDB = $DIC['ilDB'];
256 
257  $query = "SELECT meta_identifier_id, obj_id FROM il_meta_identifier " .
258  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') .
259  " AND obj_type = " . $ilDB->quote($a_obj_type, 'text') .
260  " AND catalog = " . $ilDB->quote($a_catalog, 'text') .
261  " AND entry = " . $ilDB->quote($a_entry, 'text');
262  $s = $ilDB->query($query);
263  if ($r = $ilDB->fetchAssoc($s)) {
264  return true;
265  }
266  return false;
267  }
global $DIC
Definition: saml.php:7
$s
Definition: pwgen.php:45
$r
Definition: example_031.php:79
$query
global $ilDB
+ Here is the caller graph for this function:

◆ getCatalog() [1/3]

ilMDIdentifier::getCatalog ( )

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

41  {
42  return $this->catalog;
43  }

◆ getCatalog() [2/3]

ilMDIdentifier::getCatalog ( )

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

Referenced by __getFields(), and toXML().

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

◆ getCatalog() [3/3]

ilMDIdentifier::getCatalog ( )

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

41  {
42  return $this->catalog;
43  }

◆ getEntry() [1/3]

ilMDIdentifier::getEntry ( )

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

Referenced by __getFields(), and toXML().

49  {
50  return $this->entry;
51  }
+ Here is the caller graph for this function:

◆ getEntry() [2/3]

ilMDIdentifier::getEntry ( )

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

49  {
50  return $this->entry;
51  }

◆ getEntry() [3/3]

ilMDIdentifier::getEntry ( )

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

49  {
50  return $this->entry;
51  }

◆ read() [1/3]

ilMDIdentifier::read ( )

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

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setCatalog(), setEntry(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setParentId(), ilMDBase\setParentType(), ilMDBase\setRBACId(), and ilUtil\stripSlashes().

113  {
114  global $ilDB;
115 
116  if ($this->getMetaId()) {
117  $query = "SELECT * FROM il_meta_identifier " .
118  "WHERE meta_identifier_id = " . $ilDB->quote($this->getMetaId());
119 
120  $res = $this->db->query($query);
121  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
122  $this->setRBACId($row->rbac_id);
123  $this->setObjId($row->obj_id);
124  $this->setObjType($row->obj_type);
125  $this->setParentId($row->parent_id);
126  $this->setParentType($row->parent_type);
127  $this->setCatalog(ilUtil::stripSlashes($row->catalog));
128  $this->setEntry(ilUtil::stripSlashes($row->entry));
129  }
130  }
131  return true;
132  }
setObjType($a_type)
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
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ read() [2/3]

ilMDIdentifier::read ( )

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

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setCatalog(), setEntry(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setParentId(), ilMDBase\setParentType(), and ilMDBase\setRBACId().

116  {
117  global $DIC;
118 
119  $ilDB = $DIC['ilDB'];
120 
121  if ($this->getMetaId()) {
122  $query = "SELECT * FROM il_meta_identifier " .
123  "WHERE meta_identifier_id = " . $ilDB->quote($this->getMetaId(), 'integer');
124 
125  $res = $this->db->query($query);
126  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
127  $this->setRBACId($row->rbac_id);
128  $this->setObjId($row->obj_id);
129  $this->setObjType($row->obj_type);
130  $this->setParentId($row->parent_id);
131  $this->setParentType($row->parent_type);
132  $this->setCatalog($row->catalog);
133  $this->setEntry($row->entry);
134  }
135  }
136  return true;
137  }
setObjType($a_type)
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$query
setParentId($a_id)
$row
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ read() [3/3]

ilMDIdentifier::read ( )

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

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setCatalog(), setEntry(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setParentId(), ilMDBase\setParentType(), and ilMDBase\setRBACId().

116  {
117  global $DIC;
118 
119  $ilDB = $DIC['ilDB'];
120 
121  if ($this->getMetaId()) {
122  $query = "SELECT * FROM il_meta_identifier " .
123  "WHERE meta_identifier_id = " . $ilDB->quote($this->getMetaId(), 'integer');
124 
125  $res = $this->db->query($query);
126  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
127  $this->setRBACId($row->rbac_id);
128  $this->setObjId($row->obj_id);
129  $this->setObjType($row->obj_type);
130  $this->setParentId($row->parent_id);
131  $this->setParentType($row->parent_type);
132  $this->setCatalog($row->catalog);
133  $this->setEntry($row->entry);
134  }
135  }
136  return true;
137  }
setObjType($a_type)
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$query
setParentId($a_id)
$row
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ readIdData() [1/2]

static ilMDIdentifier::readIdData (   $a_rbac_id,
  $a_obj_type,
  $a_catalog,
  $a_entry 
)
static

Does id entry exist in rbac object?

Parameters

Definition at line 275 of file class.ilMDIdentifier.php.

References $data, $DIC, $ilDB, $query, $r, and $s.

Referenced by ilLMObject\getExportIDInfo().

276  {
277  global $DIC;
278 
279  $ilDB = $DIC['ilDB'];
280 
281  $query = "SELECT * FROM il_meta_identifier " .
282  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') .
283  " AND obj_type = " . $ilDB->quote($a_obj_type, 'text') .
284  " AND catalog = " . $ilDB->quote($a_catalog, 'text') .
285  " AND entry = " . $ilDB->quote($a_entry, 'text');
286  $s = $ilDB->query($query);
287  $data = array();
288  while ($r = $ilDB->fetchAssoc($s)) {
289  $data[] = $r;
290  }
291  return $data;
292  }
global $DIC
Definition: saml.php:7
$s
Definition: pwgen.php:45
$r
Definition: example_031.php:79
$query
global $ilDB
$data
Definition: bench.php:6
+ Here is the caller graph for this function:

◆ readIdData() [2/2]

static ilMDIdentifier::readIdData (   $a_rbac_id,
  $a_obj_type,
  $a_catalog,
  $a_entry 
)
static

Does id entry exist in rbac object?

Parameters

Definition at line 275 of file class.ilMDIdentifier.php.

References $data, $DIC, $ilDB, $query, $r, and $s.

276  {
277  global $DIC;
278 
279  $ilDB = $DIC['ilDB'];
280 
281  $query = "SELECT * FROM il_meta_identifier " .
282  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') .
283  " AND obj_type = " . $ilDB->quote($a_obj_type, 'text') .
284  " AND catalog = " . $ilDB->quote($a_catalog, 'text') .
285  " AND entry = " . $ilDB->quote($a_entry, 'text');
286  $s = $ilDB->query($query);
287  $data = array();
288  while ($r = $ilDB->fetchAssoc($s)) {
289  $data[] = $r;
290  }
291  return $data;
292  }
global $DIC
Definition: saml.php:7
$s
Definition: pwgen.php:45
$r
Definition: example_031.php:79
$query
global $ilDB
$data
Definition: bench.php:6

◆ save() [1/3]

ilMDIdentifier::save ( )

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

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

55  {
56  global $DIC;
57 
58  $ilDB = $DIC['ilDB'];
59 
60  $fields = $this->__getFields();
61  $fields['meta_identifier_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_identifier'));
62 
63  if ($this->db->insert('il_meta_identifier', $fields)) {
64  $this->setMetaId($next_id);
65  return $this->getMetaId();
66  }
67  return false;
68  }
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() [2/3]

ilMDIdentifier::save ( )

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

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

55  {
56  if ($this->db->autoExecute(
57  'il_meta_identifier',
58  $this->__getFields(),
60  )) {
61  $this->setMetaId($this->db->getLastInsertId());
62 
63  return $this->getMetaId();
64  }
65  return false;
66  }
setMetaId($a_meta_id, $a_read_data=true)
+ Here is the call graph for this function:

◆ save() [3/3]

ilMDIdentifier::save ( )

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

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

55  {
56  global $DIC;
57 
58  $ilDB = $DIC['ilDB'];
59 
60  $fields = $this->__getFields();
61  $fields['meta_identifier_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_identifier'));
62 
63  if ($this->db->insert('il_meta_identifier', $fields)) {
64  $this->setMetaId($next_id);
65  return $this->getMetaId();
66  }
67  return false;
68  }
global $DIC
Definition: saml.php:7
setMetaId($a_meta_id, $a_read_data=true)
global $ilDB
+ Here is the call graph for this function:

◆ setCatalog() [1/3]

ilMDIdentifier::setCatalog (   $a_catalog)

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

Referenced by read().

37  {
38  $this->catalog = $a_catalog;
39  }
+ Here is the caller graph for this function:

◆ setCatalog() [2/3]

ilMDIdentifier::setCatalog (   $a_catalog)

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

37  {
38  $this->catalog = $a_catalog;
39  }

◆ setCatalog() [3/3]

ilMDIdentifier::setCatalog (   $a_catalog)

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

37  {
38  $this->catalog = $a_catalog;
39  }

◆ setEntry() [1/3]

ilMDIdentifier::setEntry (   $a_entry)

Definition at line 44 of file class.ilMDIdentifier.php.

45  {
46  $this->entry = $a_entry;
47  }

◆ setEntry() [2/3]

ilMDIdentifier::setEntry (   $a_entry)

Definition at line 44 of file class.ilMDIdentifier.php.

Referenced by read().

45  {
46  $this->entry = $a_entry;
47  }
+ Here is the caller graph for this function:

◆ setEntry() [3/3]

ilMDIdentifier::setEntry (   $a_entry)

Definition at line 44 of file class.ilMDIdentifier.php.

45  {
46  $this->entry = $a_entry;
47  }

◆ toXML() [1/3]

ilMDIdentifier::toXML ( $writer)

Definition at line 139 of file class.ilMDIdentifier.php.

References getCatalog(), and getEntry().

140  {
141  $writer->xmlElement('Identifier', array('Catalog' => $this->getCatalog(),
142  'Entry' => $this->getEntry()));
143  }
+ Here is the call graph for this function:

◆ toXML() [2/3]

ilMDIdentifier::toXML ( $writer,
  $a_overwrite_id = false 
)

Definition at line 144 of file class.ilMDIdentifier.php.

References getCatalog(), getEntry(), ilMDBase\getExportMode(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

145  {
146  $entry_default = ($this->getObjId() == 0)
147  ? "il_" . IL_INST_ID . "_" . $this->getObjType() . "_" . $this->getRBACId()
148  : "il_" . IL_INST_ID . "_" . $this->getObjType() . "_" . $this->getObjId();
149 
150  $entry = $this->getEntry() ? $this->getEntry() : $entry_default;
151  $catalog = $this->getCatalog();
152 
153  if ($this->getExportMode() && $this->getCatalog() != "ILIAS_NID") {
154  $entry = $entry_default;
155  $catalog = "ILIAS";
156  }
157 
158  if (strlen($catalog)) {
159  $writer->xmlElement('Identifier', array('Catalog' => $catalog,
160  'Entry' => $entry));
161  } else {
162  $writer->xmlElement('Identifier', array('Entry' => $entry));
163  }
164  }
+ Here is the call graph for this function:

◆ toXML() [3/3]

ilMDIdentifier::toXML ( $writer,
  $a_overwrite_id = false 
)

Definition at line 144 of file class.ilMDIdentifier.php.

References getCatalog(), getEntry(), ilMDBase\getExportMode(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

145  {
146  $entry_default = ($this->getObjId() == 0)
147  ? "il_" . IL_INST_ID . "_" . $this->getObjType() . "_" . $this->getRBACId()
148  : "il_" . IL_INST_ID . "_" . $this->getObjType() . "_" . $this->getObjId();
149 
150  $entry = $this->getEntry() ? $this->getEntry() : $entry_default;
151  $catalog = $this->getCatalog();
152 
153  if ($this->getExportMode() && $this->getCatalog() != "ILIAS_NID") {
154  $entry = $entry_default;
155  $catalog = "ILIAS";
156  }
157 
158  if (strlen($catalog)) {
159  $writer->xmlElement('Identifier', array('Catalog' => $catalog,
160  'Entry' => $entry));
161  } else {
162  $writer->xmlElement('Identifier', array('Entry' => $entry));
163  }
164  }
+ Here is the call graph for this function:

◆ update() [1/3]

ilMDIdentifier::update ( )

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

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

69  {
70  global $ilDB;
71 
72  if ($this->getMetaId()) {
73  if ($this->db->autoExecute(
74  'il_meta_identifier',
75  $this->__getFields(),
77  "meta_identifier_id = " . $ilDB->quote($this->getMetaId())
78  )) {
79  return true;
80  }
81  }
82  return false;
83  }
global $ilDB
+ Here is the call graph for this function:

◆ update() [2/3]

ilMDIdentifier::update ( )

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

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

71  {
72  global $DIC;
73 
74  $ilDB = $DIC['ilDB'];
75 
76  if ($this->getMetaId()) {
77  if ($this->db->update(
78  'il_meta_identifier',
79  $this->__getFields(),
80  array("meta_identifier_id" => array('integer',$this->getMetaId()))
81  )) {
82  return true;
83  }
84  }
85  return false;
86  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ update() [3/3]

ilMDIdentifier::update ( )

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

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

71  {
72  global $DIC;
73 
74  $ilDB = $DIC['ilDB'];
75 
76  if ($this->getMetaId()) {
77  if ($this->db->update(
78  'il_meta_identifier',
79  $this->__getFields(),
80  array("meta_identifier_id" => array('integer',$this->getMetaId()))
81  )) {
82  return true;
83  }
84  }
85  return false;
86  }
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: