ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ilECSUserConsent.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
25
class
ilECSUserConsent
26
{
27
private
int
$usr_id
;
28
private
int
$server_id
;
29
private
int
$mid
;
30
31
protected
ilDBInterface
$db
;
32
33
public
function
__construct
(
int
$a_usr_id,
int
$server_id,
int
$a_mid)
34
{
35
global
$DIC
;
36
37
$this->db = $DIC->database();
38
39
$this->usr_id = $a_usr_id;
40
$this->server_id =
$server_id
;
41
$this->mid = $a_mid;
42
}
43
44
public
function
getUserId
():
int
45
{
46
return
$this->usr_id
;
47
}
48
49
public
function
getMid
():
int
50
{
51
return
$this->mid
;
52
}
53
54
public
function
getServerId
():
int
55
{
56
return
$this->server_id
;
57
}
58
59
public
function
save
(): void
60
{
61
$this->db->replace(
62
'ecs_user_consent'
,
63
[
64
'usr_id'
=> [
ilDBConstants::T_INTEGER
, $this->
getUserId
()],
65
'server_id'
=> [
ilDBConstants::T_INTEGER
, $this->
getServerId
()],
66
'mid'
=> [
ilDBConstants::T_INTEGER
, $this->
getMid
()]
67
],
68
[]
69
);
70
}
71
72
public
function
delete
():
void
73
{
74
$query =
'DELETE FROM ecs_user_consent '
.
75
'WHERE usr_id = '
. $this->db->quote(
76
$this->
getUserId
(),
77
ilDBConstants::T_INTEGER
78
) .
' '
.
79
'AND server_id = '
. $this->db->quote(
80
$this->
getServerId
(),
81
ilDBConstants::T_INTEGER
82
) .
' '
.
83
'AND mid = '
. $this->db->quote(
84
$this->
getMid
(),
85
ilDBConstants::T_INTEGER
86
);
87
$this->db->manipulate($query);
88
}
89
}
ilECSUserConsent\$mid
int $mid
Definition:
class.ilECSUserConsent.php:29
ilECSUserConsent\$usr_id
int $usr_id
Definition:
class.ilECSUserConsent.php:27
ilECSUserConsent\$db
ilDBInterface $db
Definition:
class.ilECSUserConsent.php:31
ilECSUserConsent\$server_id
int $server_id
Definition:
class.ilECSUserConsent.php:28
ilECSUserConsent\save
save()
Definition:
class.ilECSUserConsent.php:59
$DIC
global $DIC
Definition:
shib_login.php:26
ilECSUserConsent\__construct
__construct(int $a_usr_id, int $server_id, int $a_mid)
Definition:
class.ilECSUserConsent.php:33
ilDBInterface
ilECSUserConsent\getServerId
getServerId()
Definition:
class.ilECSUserConsent.php:54
ilECSUserConsent\getMid
getMid()
Definition:
class.ilECSUserConsent.php:49
ilECSUserConsent\getUserId
getUserId()
Definition:
class.ilECSUserConsent.php:44
ilECSUserConsent
Class ilECSUserConsent.
Definition:
class.ilECSUserConsent.php:25
ilDBConstants\T_INTEGER
const T_INTEGER
Definition:
class.ilDBConstants.php:55
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
components
ILIAS
WebServices
ECS
classes
Consent
class.ilECSUserConsent.php
Generated on Sun Aug 31 2025 23:04:21 for ILIAS by
1.8.13 (using
Doxyfile
)