19 declare(strict_types=1);
45 $this->db = $DIC->database();
46 $this->ilObjDataCache = $DIC[
'ilObjDataCache'];
47 $this->rbacreview = $DIC[
'rbacreview'];
48 $this->mapping_id = $a_mapping_id;
54 public function read(): void
56 $query =
"SELECT * FROM ldap_rg_mapping " 57 .
"WHERE mapping_id = " . $this->db->quote($this->
getMappingId(),
'integer');
58 $set = $this->db->query(
$query);
59 $rec = $this->db->fetchAssoc($set);
62 $this->
setURL($rec[
"url"]);
63 $this->
setDN($rec[
"dn"]);
66 $this->
setRole((
int) $rec[
"role"]);
74 public function delete():
void 76 $query =
"DELETE FROM ldap_rg_mapping " .
77 "WHERE mapping_id = " . $this->db->quote($this->
getMappingId(),
'integer');
78 $this->db->manipulate(
$query);
86 $query =
"UPDATE ldap_rg_mapping " .
87 "SET server_id = " . $this->db->quote($this->
getServerId(),
'integer') .
", " .
88 "url = " . $this->db->quote($this->
getURL(),
'text') .
", " .
89 "dn =" . $this->db->quote($this->
getDN(),
'text') .
", " .
91 "member_isdn = " . $this->db->quote($this->
getMemberISDN(),
'integer') .
", " .
92 "role = " . $this->db->quote($this->
getRole(),
'integer') .
", " .
93 "mapping_info = " . $this->db->quote($this->
getMappingInfo(),
'text') .
", " .
94 "mapping_info_type = " . $this->db->quote($this->
getMappingInfoType(),
'integer') .
" " .
95 "WHERE mapping_id = " . $this->db->quote($this->
getMappingId(),
'integer');
96 $this->db->manipulate(
$query);
104 $this->
setMappingId($this->db->nextId(
'ldap_rg_mapping'));
105 $query =
"INSERT INTO ldap_rg_mapping (mapping_id,server_id,url,dn,member_attribute,member_isdn,role,mapping_info,mapping_info_type) " .
107 $this->db->quote($this->
getMappingId(),
'integer') .
", " .
108 $this->db->quote($this->
getServerId(),
'integer') .
", " .
109 $this->db->quote($this->
getURL(),
'text') .
", " .
110 $this->db->quote($this->
getDN(),
'text') .
", " .
113 $this->db->quote($this->
getRole(),
'integer') .
", " .
117 $this->db->manipulate($query);
135 $this->mapping_id = $a_value;
153 $this->server_id = $a_value;
169 public function setURL(
string $a_value): void
171 $this->url = $a_value;
185 public function setDN(
string $a_value): void
187 $this->dn = $a_value;
203 $this->member_attribute = $a_value;
220 $this->member_isdn = $a_value;
236 $this->role = $a_value;
244 return $this->ilObjDataCache->lookupTitle($this->role);
268 $this->mapping_info = $a_value;
284 $this->mapping_info_type = $a_value;
setServerId(int $a_value)
set server id
getRole()
get ILIAS Role Name id
getMappingId()
get mapping id
setMemberISDN(bool $a_value)
set Member Attribute Value is DN
setMappingInfoType(bool $a_value)
set Show Information also in the Repository/Personal Desktop
setRoleByName(string $a_value)
set ILIAS Role Name
getServerId()
get server id
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
setMappingInfo(string $a_value)
set Information Text
setDN(string $a_value)
set group dn
getMemberAttribute()
get Group Member Attribute
setURL(string $a_value)
set url
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getRoleName()
get ILIAS Role Name
update()
update mapping by id
setMappingId(int $a_value)
set mapping id
getMappingInfoType()
get Show Information also in the Repository/Personal Desktop
getMappingInfo()
get Information Text
getMemberISDN()
get Member Attribute Value is DN
setMemberAttribute(string $a_value)
set Group Member Attribute
ilObjectDataCache $ilObjDataCache
setRole(int $a_value)
set ILIAS Role Name id
__construct(int $a_mapping_id)