ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilShibbolethPluginWrapper.php
Go to the documentation of this file.
1 <?php
24 {
27  protected static ?ilShibbolethPluginWrapper $cache = null;
28 
29  protected function __construct()
30  {
31  global $DIC;
32  $this->component_factory = $DIC["component.factory"];
33  $this->log = $DIC['ilLog'];
34  }
35 
36  public static function getInstance(): self
37  {
38  if (!self::$cache instanceof self) {
39  self::$cache = new self();
40  }
41 
42  return self::$cache;
43  }
44 
45  protected function getPluginObjects(): Iterator
46  {
47  return $this->component_factory->getActivePluginsInSlot('shibhk');
48  }
49 
50 
51  public function beforeLogin(ilObjUser $user): ilObjUser
52  {
53  foreach ($this->getPluginObjects() as $pl) {
54  $user = $pl->beforeLogin($user);
55  }
56 
57  return $user;
58  }
59 
60 
61  public function afterLogin(ilObjUser $user): ilObjUser
62  {
63  foreach ($this->getPluginObjects() as $pl) {
64  $user = $pl->afterLogin($user);
65  }
66 
67  return $user;
68  }
69 
70 
71  public function beforeCreateUser(ilObjUser $user): ilObjUser
72  {
73  foreach ($this->getPluginObjects() as $pl) {
74  $user = $pl->beforeCreateUser($user);
75  }
76 
77  return $user;
78  }
79 
80 
81  public function afterCreateUser(ilObjUser $user): ilObjUser
82  {
83  foreach ($this->getPluginObjects() as $pl) {
84  $user = $pl->afterCreateUser($user);
85  }
86 
87  return $user;
88  }
89 
90 
91  public function beforeLogout(ilObjUser $user): ilObjUser
92  {
93  foreach ($this->getPluginObjects() as $pl) {
94  $user = $pl->beforeLogout($user);
95  }
96 
97  return $user;
98  }
99 
100 
101  public function afterLogout(ilObjUser $user): ilObjUser
102  {
103  $this->log->log('afterlogout');
104  foreach ($this->getPluginObjects() as $pl) {
105  $user = $pl->afterLogout($user);
106  }
107 
108  return $user;
109  }
110 
111 
112  public function beforeUpdateUser(ilObjUser $user): ilObjUser
113  {
114  foreach ($this->getPluginObjects() as $pl) {
115  $user = $pl->beforeUpdateUser($user);
116  }
117 
118  return $user;
119  }
120 
121 
122  public function afterUpdateUser(ilObjUser $user): ilObjUser
123  {
124  foreach ($this->getPluginObjects() as $pl) {
125  $user = $pl->afterUpdateUser($user);
126  }
127 
128  return $user;
129  }
130 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Component logger with individual log levels by component id.
static ilShibbolethPluginWrapper $cache
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:22