ILIAS  release_8 Revision v8.24
ilECSUserConsent Class Reference

Class ilECSUserConsent. More...

+ Collaboration diagram for ilECSUserConsent:

Public Member Functions

 __construct (int $a_usr_id, int $server_id, int $a_mid)
 
 getUserId ()
 
 getMid ()
 
 getServerId ()
 
 save ()
 
 delete ()
 

Protected Attributes

ilDBInterface $db
 

Private Attributes

int $usr_id
 
int $server_id
 
int $mid
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilECSUserConsent::__construct ( int  $a_usr_id,
int  $server_id,
int  $a_mid 
)

Definition at line 32 of file class.ilECSUserConsent.php.

33 {
34 global $DIC;
35
36 $this->db = $DIC->database();
37
38 $this->usr_id = $a_usr_id;
39 $this->server_id = $server_id;
40 $this->mid = $a_mid;
41 }
global $DIC
Definition: feed.php:28

References $DIC, and $server_id.

Member Function Documentation

◆ delete()

ilECSUserConsent::delete ( )

Definition at line 71 of file class.ilECSUserConsent.php.

71 : void
72 {
73 $query = 'DELETE FROM ecs_user_consent ' .
74 'WHERE usr_id = ' . $this->db->quote(
75 $this->getUserId(),
77 ) . ' ' .
78 'AND server_id = ' . $this->db->quote(
79 $this->getServerId(),
81 ) . ' ' .
82 'AND mid = ' . $this->db->quote(
83 $this->getMid(),
85 );
86 $this->db->manipulate($query);
87 }
$query

References $query, getUserId(), and ilDBConstants\T_INTEGER.

+ Here is the call graph for this function:

◆ getMid()

ilECSUserConsent::getMid ( )

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

48 : int
49 {
50 return $this->mid;
51 }

References $mid.

Referenced by save().

+ Here is the caller graph for this function:

◆ getServerId()

ilECSUserConsent::getServerId ( )

Definition at line 53 of file class.ilECSUserConsent.php.

53 : int
54 {
55 return $this->server_id;
56 }

References $server_id.

Referenced by save().

+ Here is the caller graph for this function:

◆ getUserId()

ilECSUserConsent::getUserId ( )

Definition at line 43 of file class.ilECSUserConsent.php.

43 : int
44 {
45 return $this->usr_id;
46 }

References $usr_id.

Referenced by delete(), and save().

+ Here is the caller graph for this function:

◆ save()

ilECSUserConsent::save ( )

Definition at line 58 of file class.ilECSUserConsent.php.

58 : void
59 {
60 $this->db->replace(
61 'ecs_user_consent',
62 [
63 'usr_id' => [ilDBConstants::T_INTEGER, $this->getUserId()],
64 'server_id' => [ilDBConstants::T_INTEGER, $this->getServerId()],
65 'mid' => [ilDBConstants::T_INTEGER, $this->getMid()]
66 ],
67 []
68 );
69 }

References getMid(), getServerId(), getUserId(), and ilDBConstants\T_INTEGER.

+ Here is the call graph for this function:

Field Documentation

◆ $db

ilDBInterface ilECSUserConsent::$db
protected

Definition at line 30 of file class.ilECSUserConsent.php.

◆ $mid

int ilECSUserConsent::$mid
private

Definition at line 28 of file class.ilECSUserConsent.php.

Referenced by getMid().

◆ $server_id

int ilECSUserConsent::$server_id
private

Definition at line 27 of file class.ilECSUserConsent.php.

Referenced by __construct(), and getServerId().

◆ $usr_id

int ilECSUserConsent::$usr_id
private

Definition at line 26 of file class.ilECSUserConsent.php.

Referenced by getUserId().


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