ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Settings.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\DataProtection;
22
23use DateTimeImmutable;
29
30final class Settings implements SettingsInterface
31{
32 public function __construct(private readonly SelectSetting $select)
33 {
34 }
35
39 public function enabled(): Setting
40 {
41 return $this->select->typed('dpro_enabled', $this->boolean(...));
42 }
43
47 public function validateOnLogin(): Setting
48 {
49 return $this->select->typed('dpro_validate_on_login', $this->boolean(...));
50 }
51
56 {
57 return $this->select->typed('dpro_withdrawal_usr_deletion', $this->boolean(...));
58 }
59
63 public function adminEmail(): Setting
64 {
65 return $this->select->typed('admin_email', fn(Marshal $m) => $m->string());
66 }
67
71 public function authMode(): Setting
72 {
73 return $this->select->typed('auth_mode', fn(Marshal $m) => $m->string());
74 }
75
79 public function lastResetDate(): Setting
80 {
81 return $this->select->typed('dpro_last_reset_date', fn(Marshal $m) => $m->dateTime());
82 }
83
87 public function noAcceptance(): Setting
88 {
89 return $this->select->typed('dpro_no_acceptance', $this->boolean(...));
90 }
91
92 private function boolean(Marshal $m): Convert
93 {
94 return $m->boolean();
95 }
96}
__construct(private readonly SelectSetting $select)
Definition: Settings.php:32