ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Authentication.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS;
22
24{
25 public function init(
26 array | \ArrayAccess &$define,
27 array | \ArrayAccess &$implement,
28 array | \ArrayAccess &$use,
29 array | \ArrayAccess &$contribute,
30 array | \ArrayAccess &$seek,
31 array | \ArrayAccess &$provide,
32 array | \ArrayAccess &$pull,
33 array | \ArrayAccess &$internal,
34 ): void {
35 // currently this is will be a session storage because we cannot store
36 // data on the client, see https://mantis.ilias.de/view.php?id=38503.
37 // @todo: this should be implemented by some proper key-value storage (or service).
38 $implement[UI\Storage::class] = static fn() =>
39 new class () implements UI\Storage {
40 public function offsetExists(mixed $offset): bool
41 {
43 }
44 public function offsetGet(mixed $offset): mixed
45 {
47 }
48 public function offsetSet(mixed $offset, mixed $value): void
49 {
50 if (!is_string($offset)) {
51 throw new \InvalidArgumentException('Offset needs to be of type string.');
52 }
53 \ilSession::set($offset, $value);
54 }
55 public function offsetUnset(mixed $offset): void
56 {
57 \ilSession::clear($offset);
58 }
59 };
60
61 $contribute[\ILIAS\Setup\Agent::class] = static fn() =>
62 new \ilAuthenticationSetupAgent(
63 $pull[\ILIAS\Refinery\Factory::class]
64 );
65
66 $contribute[Component\Resource\PublicAsset::class] = fn() =>
67 new Component\Resource\Endpoint($this, 'sessioncheck.php');
68 $contribute[Component\Resource\PublicAsset::class] = fn() =>
69 new Component\Resource\ComponentJS($this, 'js/dist/SessionReminder.min.js');
70 $contribute[User\Settings\UserSettings::class] = fn() =>
71 new Authentication\UserSettings\Settings();
72 }
73}
init(array|\ArrayAccess &$define, array|\ArrayAccess &$implement, array|\ArrayAccess &$use, array|\ArrayAccess &$contribute, array|\ArrayAccess &$seek, array|\ArrayAccess &$provide, array|\ArrayAccess &$pull, array|\ArrayAccess &$internal,)
Definition: UI.php:24
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
A component is the most general form of an entity in the UI.
Definition: Component.php:28
get(string $class_name)
has(string $class_name)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.