ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLDAPRoleGroupMappingSetting Class Reference
+ Collaboration diagram for ilLDAPRoleGroupMappingSetting:

Public Member Functions

 __construct ($a_mapping_id)
 constructor @global ilDB $ilDB More...
 
 read ()
 read data from db More...
 
 delete ()
 delete mapping by id More...
 
 update ()
 update mapping by id More...
 
 save ()
 create new mapping More...
 
 getMappingId ()
 get mapping id More...
 
 setMappingId ($a_value)
 set mapping id More...
 
 getServerId ()
 get server id More...
 
 setServerId ($a_value)
 set server id More...
 
 getURL ()
 get url More...
 
 setURL ($a_value)
 set url More...
 
 getDN ()
 get group dn More...
 
 setDN ($a_value)
 set group dn More...
 
 getMemberAttribute ()
 get Group Member Attribute More...
 
 setMemberAttribute ($a_value)
 set Group Member Attribute More...
 
 getMemberISDN ()
 get Member Attribute Value is DN More...
 
 setMemberISDN ($a_value)
 set Member Attribute Value is DN More...
 
 getRole ()
 get ILIAS Role Name id More...
 
 setRole ($a_value)
 set ILIAS Role Name id More...
 
 getRoleName ()
 get ILIAS Role Name @global type $ilObjDataCache More...
 
 setRoleByName ($a_value)
 set ILIAS Role Name @global ilRbacReview $rbacreview More...
 
 getMappingInfo ()
 get Information Text More...
 
 setMappingInfo ($a_value)
 set Information Text More...
 
 getMappingInfoType ()
 get Show Information also in the Repository/Personal Desktop More...
 
 setMappingInfoType ($a_value)
 set Show Information also in the Repository/Personal Desktop More...
 

Detailed Description

Author
Fabian Wolf wolf@.nosp@m.leif.nosp@m.os.de
Version
Id

/

Definition at line 12 of file class.ilLDAPRoleGroupMappingSetting.php.

Constructor & Destructor Documentation

◆ __construct()

ilLDAPRoleGroupMappingSetting::__construct (   $a_mapping_id)

constructor @global ilDB $ilDB

Parameters
int$a_mapping_id

Definition at line 19 of file class.ilLDAPRoleGroupMappingSetting.php.

20 {
21 global $ilDB;
22 $this->db = $ilDB;
23 $this->mapping_id = $a_mapping_id;
24 }
global $ilDB

References $ilDB.

Member Function Documentation

◆ delete()

ilLDAPRoleGroupMappingSetting::delete ( )

delete mapping by id

Definition at line 50 of file class.ilLDAPRoleGroupMappingSetting.php.

51 {
52 $query = "DELETE FROM ldap_rg_mapping ".
53 "WHERE mapping_id = ".$this->db->quote($this->getMappingId(),'integer');
54 $res = $this->db->manipulate($query);
55 }

References $query, $res, and getMappingId().

+ Here is the call graph for this function:

◆ getDN()

ilLDAPRoleGroupMappingSetting::getDN ( )

get group dn

Returns
string

Definition at line 154 of file class.ilLDAPRoleGroupMappingSetting.php.

155 {
156 return $this->dn;
157 }

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ getMappingId()

ilLDAPRoleGroupMappingSetting::getMappingId ( )

get mapping id

Returns
int mapping id

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

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

Referenced by delete(), read(), save(), and update().

+ Here is the caller graph for this function:

◆ getMappingInfo()

ilLDAPRoleGroupMappingSetting::getMappingInfo ( )

get Information Text

Returns
string

Definition at line 248 of file class.ilLDAPRoleGroupMappingSetting.php.

249 {
250 return $this->mapping_info;
251 }

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ getMappingInfoType()

ilLDAPRoleGroupMappingSetting::getMappingInfoType ( )

get Show Information also in the Repository/Personal Desktop

Returns
bool

Definition at line 266 of file class.ilLDAPRoleGroupMappingSetting.php.

267 {
268 return $this->mapping_info_type;
269 }

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ getMemberAttribute()

ilLDAPRoleGroupMappingSetting::getMemberAttribute ( )

get Group Member Attribute

Returns
string

Definition at line 172 of file class.ilLDAPRoleGroupMappingSetting.php.

173 {
174 return $this->member_attribute;
175 }

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ getMemberISDN()

ilLDAPRoleGroupMappingSetting::getMemberISDN ( )

get Member Attribute Value is DN

Returns
bool

Definition at line 190 of file class.ilLDAPRoleGroupMappingSetting.php.

191 {
192 return $this->member_isdn;
193 }

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ getRole()

ilLDAPRoleGroupMappingSetting::getRole ( )

get ILIAS Role Name id

Returns
int

Definition at line 208 of file class.ilLDAPRoleGroupMappingSetting.php.

209 {
210 return $this->role;
211 }

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ getRoleName()

ilLDAPRoleGroupMappingSetting::getRoleName ( )

get ILIAS Role Name @global type $ilObjDataCache

Returns
string

Definition at line 227 of file class.ilLDAPRoleGroupMappingSetting.php.

228 {
229 global $ilObjDataCache;
230 return $ilObjDataCache->lookupTitle($this->role);
231 }

◆ getServerId()

ilLDAPRoleGroupMappingSetting::getServerId ( )

get server id

Returns
int server id id

Definition at line 118 of file class.ilLDAPRoleGroupMappingSetting.php.

119 {
120 return $this->server_id;
121 }

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ getURL()

ilLDAPRoleGroupMappingSetting::getURL ( )

get url

Returns
string url

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

137 {
138 return $this->url;
139 }
$url
Definition: shib_logout.php:72

References $url.

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ read()

ilLDAPRoleGroupMappingSetting::read ( )

read data from db

Definition at line 29 of file class.ilLDAPRoleGroupMappingSetting.php.

30 {
31 $query = "SELECT * FROM ldap_rg_mapping "
32 ."WHERE mapping_id = " . $this->db->quote($this->getMappingId(),'integer');
33 $set = $this->db->query($query);
34 $rec = $this->db->fetchAssoc($set);
35
36 $this->setMappingId($rec["mapping_id"]);
37 $this->setServerId($rec["server_id"]);
38 $this->setURL($rec["url"]);
39 $this->setDN($rec["dn"]);
40 $this->setMemberAttribute($rec["member_attribute"]);
41 $this->setMemberISDN($rec["member_isdn"]);
42 $this->setRole($rec["role"]);
43 $this->setMappingInfo($rec["mapping_info"]);
44 $this->setMappingInfoType($rec["mapping_info_type"]);
45 }
setMemberAttribute($a_value)
set Group Member Attribute
setMappingInfoType($a_value)
set Show Information also in the Repository/Personal Desktop
setMemberISDN($a_value)
set Member Attribute Value is DN

References $query, getMappingId(), setDN(), setMappingId(), setMappingInfo(), setMappingInfoType(), setMemberAttribute(), setMemberISDN(), setRole(), setServerId(), and setURL().

+ Here is the call graph for this function:

◆ save()

ilLDAPRoleGroupMappingSetting::save ( )

create new mapping

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

79 {
80 $this->setMappingId($this->db->nextId('ldap_rg_mapping'));
81 $query = "INSERT INTO ldap_rg_mapping (mapping_id,server_id,url,dn,member_attribute,member_isdn,role,mapping_info,mapping_info_type) ".
82 "VALUES ( ".
83 $this->db->quote($this->getMappingId(),'integer').", ".
84 $this->db->quote($this->getServerId(),'integer').", ".
85 $this->db->quote($this->getURL(),'text').", ".
86 $this->db->quote($this->getDN(),'text').", ".
87 $this->db->quote($this->getMemberAttribute(),'text').", ".
88 $this->db->quote($this->getMemberISDN(),'integer').", ".
89 $this->db->quote($this->getRole(),'integer').", ".
90 $this->db->quote($this->getMappingInfo(),'text').", ".
91 $this->db->quote($this->getMappingInfoType(),'integer').
92 ")";
93 $res = $this->db->manipulate($query);
94 }
getMappingInfoType()
get Show Information also in the Repository/Personal Desktop
getMemberISDN()
get Member Attribute Value is DN

References $query, $res, getDN(), getMappingId(), getMappingInfo(), getMappingInfoType(), getMemberAttribute(), getMemberISDN(), getRole(), getServerId(), getURL(), and setMappingId().

+ Here is the call graph for this function:

◆ setDN()

ilLDAPRoleGroupMappingSetting::setDN (   $a_value)

set group dn

Parameters
string$a_value

Definition at line 163 of file class.ilLDAPRoleGroupMappingSetting.php.

164 {
165 $this->dn = $a_value;
166 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setMappingId()

ilLDAPRoleGroupMappingSetting::setMappingId (   $a_value)

set mapping id

Parameters
int$a_valuemapping id

Definition at line 109 of file class.ilLDAPRoleGroupMappingSetting.php.

110 {
111 $this->mapping_id = $a_value;
112 }

Referenced by read(), and save().

+ Here is the caller graph for this function:

◆ setMappingInfo()

ilLDAPRoleGroupMappingSetting::setMappingInfo (   $a_value)

set Information Text

Parameters
string$a_value

Definition at line 257 of file class.ilLDAPRoleGroupMappingSetting.php.

258 {
259 $this->mapping_info = $a_value;
260 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setMappingInfoType()

ilLDAPRoleGroupMappingSetting::setMappingInfoType (   $a_value)

set Show Information also in the Repository/Personal Desktop

Parameters
bool$a_value

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

276 {
277 $this->mapping_info_type = $a_value;
278 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setMemberAttribute()

ilLDAPRoleGroupMappingSetting::setMemberAttribute (   $a_value)

set Group Member Attribute

Parameters
string$a_value

Definition at line 181 of file class.ilLDAPRoleGroupMappingSetting.php.

182 {
183 $this->member_attribute = $a_value;
184 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setMemberISDN()

ilLDAPRoleGroupMappingSetting::setMemberISDN (   $a_value)

set Member Attribute Value is DN

Parameters
bool$a_value

Definition at line 199 of file class.ilLDAPRoleGroupMappingSetting.php.

200 {
201 $this->member_isdn = $a_value;
202 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setRole()

ilLDAPRoleGroupMappingSetting::setRole (   $a_value)

set ILIAS Role Name id

Parameters
int$a_value

Definition at line 217 of file class.ilLDAPRoleGroupMappingSetting.php.

218 {
219 $this->role = $a_value;
220 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setRoleByName()

ilLDAPRoleGroupMappingSetting::setRoleByName (   $a_value)

set ILIAS Role Name @global ilRbacReview $rbacreview

Parameters
string$a_value

Definition at line 238 of file class.ilLDAPRoleGroupMappingSetting.php.

239 {
240 global $rbacreview;
241 $this->role = $rbacreview->roleExists(ilUtil::stripSlashes($a_value));
242 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setServerId()

ilLDAPRoleGroupMappingSetting::setServerId (   $a_value)

set server id

Parameters
int$a_valueserver id

Definition at line 127 of file class.ilLDAPRoleGroupMappingSetting.php.

128 {
129 $this->server_id = $a_value;
130 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setURL()

ilLDAPRoleGroupMappingSetting::setURL (   $a_value)

set url

Parameters
string$a_valueurl

Definition at line 145 of file class.ilLDAPRoleGroupMappingSetting.php.

146 {
147 $this->url = $a_value;
148 }

Referenced by read().

+ Here is the caller graph for this function:

◆ update()

ilLDAPRoleGroupMappingSetting::update ( )

update mapping by id

Definition at line 60 of file class.ilLDAPRoleGroupMappingSetting.php.

61 {
62 $query = "UPDATE ldap_rg_mapping ".
63 "SET server_id = ".$this->db->quote($this->getServerId(),'integer').", ".
64 "url = ".$this->db->quote($this->getURL(),'text').", ".
65 "dn =".$this->db->quote($this->getDN(),'text').", ".
66 "member_attribute = ".$this->db->quote($this->getMemberAttribute(),'text').", ".
67 "member_isdn = ".$this->db->quote($this->getMemberISDN(),'integer').", ".
68 "role = ".$this->db->quote($this->getRole(),'integer').", ".
69 "mapping_info = ".$this->db->quote($this->getMappingInfo(),'text').", ".
70 "mapping_info_type = ".$this->db->quote($this->getMappingInfoType(),'integer')." ".
71 "WHERE mapping_id = ".$this->db->quote($this->getMappingId(),'integer');
72 $res = $this->db->manipulate($query);
73 }

References $query, $res, getDN(), getMappingId(), getMappingInfo(), getMappingInfoType(), getMemberAttribute(), getMemberISDN(), getRole(), getServerId(), and getURL().

+ Here is the call graph for this function:

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