ILIAS  release_8 Revision v8.24
class.ilCertificateActiveValidator.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
28
30 {
31 if (null === $setting) {
32 $setting = new ilSetting("certificate");
33 }
34 $this->setting = $setting;
35
36 if (null === $rpcSettings) {
38 }
39 $this->rpcSettings = $rpcSettings;
40 }
41
42 public function validate(): bool
43 {
44 $globalCertificateActive = (bool) $this->setting->get('active', '0');
45
46 if (false === $globalCertificateActive) {
47 return false;
48 }
49
50 $serverActive = $this->rpcSettings->isEnabled();
51
52 if (false === $serverActive) {
53 return false;
54 }
55
56 return true;
57 }
58}
__construct(?ilSetting $setting=null, ?ilRPCServerSettings $rpcSettings=null)
Class for storing all rpc communication settings.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...