ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMD5295Identifier_ Class Reference
+ Inheritance diagram for ilMD5295Identifier_:
+ Collaboration diagram for ilMD5295Identifier_:

Public Member Functions

 setCatalog ($a_catalog)
 
 getCatalog ()
 
 setEntry ($a_entry)
 
 getEntry ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
- Public Member Functions inherited from ilMD5295Base
 __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)
 

Additional Inherited Members

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

Detailed Description

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

Member Function Documentation

◆ __getFields()

ilMD5295Identifier_::__getFields ( )

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

References getCatalog(), getEntry(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), ilMD5295Base\getParentId(), ilMD5295Base\getParentType(), and ilMD5295Base\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:

◆ _getIds()

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

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

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

Referenced by ilMD5295Relation\getIdentifier_Ids().

153  {
154  global $DIC;
155 
156  $ilDB = $DIC['ilDB'];
157 
158  $query = "SELECT meta_identifier__id FROM il_meta_identifier_ " .
159  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
160  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
161  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
162  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text');
163 
164 
165  $res = $ilDB->query($query);
166  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
167  $ids[] = $row->meta_identifier__id;
168  }
169  return $ids ? $ids : array();
170  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ delete()

ilMD5295Identifier_::delete ( )

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

References $DIC, $ilDB, $query, $res, and ilMD5295Base\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  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ getCatalog()

ilMD5295Identifier_::getCatalog ( )

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

Referenced by __getFields(), and toXML().

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

◆ getEntry()

ilMD5295Identifier_::getEntry ( )

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

Referenced by __getFields(), and toXML().

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

◆ read()

ilMD5295Identifier_::read ( )

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

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ilMD5295Base\getMetaId(), setCatalog(), setEntry(), ilMD5295Base\setObjId(), ilMD5295Base\setObjType(), ilMD5295Base\setParentId(), ilMD5295Base\setParentType(), and ilMD5295Base\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  }
setParentType($a_parent_type)
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ save()

ilMD5295Identifier_::save ( )

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

References $DIC, $ilDB, __getFields(), ilMD5295Base\getMetaId(), and ilMD5295Base\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 $ilDB
$DIC
Definition: xapitoken.php:46
setMetaId($a_meta_id, $a_read_data=true)
+ Here is the call graph for this function:

◆ setCatalog()

ilMD5295Identifier_::setCatalog (   $a_catalog)

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

Referenced by read().

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

◆ setEntry()

ilMD5295Identifier_::setEntry (   $a_entry)

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

Referenced by read().

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

◆ toXML()

ilMD5295Identifier_::toXML ( $writer)

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

References getCatalog(), and getEntry().

145  {
146  $writer->xmlElement('Identifier_', array('Catalog' => $this->getCatalog(),
147  'Entry' => $this->getEntry() ? $this->getEntry() : "ID1"));
148  }
+ Here is the call graph for this function:

◆ update()

ilMD5295Identifier_::update ( )

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

References $DIC, $ilDB, and ilMD5295Base\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 $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

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