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