ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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 33 of file class.ilECSUserConsent.php.

References $DIC, and $server_id.

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  }
global $DIC
Definition: shib_login.php:26

Member Function Documentation

◆ delete()

ilECSUserConsent::delete ( )

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

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

72  : void
73  {
74  $query = 'DELETE FROM ecs_user_consent ' .
75  'WHERE usr_id = ' . $this->db->quote(
76  $this->getUserId(),
78  ) . ' ' .
79  'AND server_id = ' . $this->db->quote(
80  $this->getServerId(),
82  ) . ' ' .
83  'AND mid = ' . $this->db->quote(
84  $this->getMid(),
86  );
87  $this->db->manipulate($query);
88  }
+ Here is the call graph for this function:

◆ getMid()

ilECSUserConsent::getMid ( )

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

References $mid.

Referenced by delete(), and save().

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

◆ getServerId()

ilECSUserConsent::getServerId ( )

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

References $server_id.

Referenced by delete(), and save().

54  : int
55  {
56  return $this->server_id;
57  }
+ Here is the caller graph for this function:

◆ getUserId()

ilECSUserConsent::getUserId ( )

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

References $usr_id.

Referenced by delete(), and save().

44  : int
45  {
46  return $this->usr_id;
47  }
+ Here is the caller graph for this function:

◆ save()

ilECSUserConsent::save ( )

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

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

59  : 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  }
+ Here is the call graph for this function:

Field Documentation

◆ $db

ilDBInterface ilECSUserConsent::$db
protected

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

◆ $mid

int ilECSUserConsent::$mid
private

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

Referenced by getMid().

◆ $server_id

int ilECSUserConsent::$server_id
private

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

Referenced by __construct(), and getServerId().

◆ $usr_id

int ilECSUserConsent::$usr_id
private

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

Referenced by getUserId().


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