-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocalDIC.php
More file actions
61 lines (53 loc) · 2.75 KB
/
LocalDIC.php
File metadata and controls
61 lines (53 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* This file is part of the UserSessionsManagement plugin for ILIAS.
* ILIAS is a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* UserSessionsManagement is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
*********************************************************************/
declare(strict_types=1);
namespace kergomard\UserSessionManagement;
use kergomard\UserSessionManagement\Config\DBRepository as ConfigDBRepository;
use kergomard\UserSessionManagement\Management\UserSessionDBRepository;
use kergomard\UserSessionManagement\Management\SessionsDataRetrieval;
use Pimple\Container as PimpleContainer;
use ILIAS\DI\Container as ILIASContainer;
use ILIAS\UI\Factory as UIFactory;
use ILIAS\UI\Renderer as UIRenderer;
use ILIAS\Refinery\Factory as Refinery;
use ILIAS\HTTP\Services as HTTPServices;
use ILIAS\Data\Factory as DataFactory;
class LocalDIC extends PimpleContainer
{
public function __construct(ILIASContainer $DIC, array $values = [])
{
parent::__construct($values);
$this['ilUser'] = static fn($c): \ilObjUser => $DIC['ilUser'];
$this['ilAuthSession'] = static fn($c): \ilAuthSession => $DIC['ilAuthSession'];
$this['il_ui_service'] = static fn($c): \ilUIService => $DIC->uiService();
$this['tpl'] = static fn($c): \ilGlobalTemplateInterface => $DIC['tpl'];
$this['ui.factory'] = static fn($c): UIFactory => $DIC['ui.factory'];
$this['ui.renderer'] = static fn($c): UIRenderer => $DIC['ui.renderer'];
$this['refinery'] = static fn($c): Refinery => $DIC['refinery'];
$this['http'] = static fn($c): HTTPServices => $DIC['http'];
$this['ilCtrl'] = static fn($c): \ilCtrl => $DIC['ilCtrl'];
$this['lng'] = static fn($c): \ilLanguage => $DIC['lng'];
$this['rbacreview'] = static fn($c): \ilRbacReview => $DIC['rbacreview'];
$this['ilAccess'] = static fn($c): \ilAccessHandler => $DIC['ilAccess'];
$this['ilLog'] = static fn($c): \ilLogger => $DIC['ilLog'];
$this['ilTabs'] = static fn($c): \ilTabsGUI => $DIC['ilTabs'];
$this['ilHelp'] = static fn($c): \ilHelpGUI => $DIC['ilHelp'];
$this['ilLocator'] = static fn($c): \ilLocatorGUI => $DIC['ilLocator'];
$this['config_repo'] = static fn($c): ConfigDBRepository
=> new ConfigDBRepository($DIC['ilDB']);
$this['user_session_repo'] = static fn($c): UserSessionDBRepository
=> new UserSessionDBRepository($DIC['ilDB'], $c['ilUser']);
$this['sessions_table_data_retriever'] = static fn($c): SessionsDataRetrieval
=> new SessionsDataRetrieval($c['user_session_repo']);
}
}