ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilCertificateActiveValidator Class Reference
+ Collaboration diagram for ilCertificateActiveValidator:

Public Member Functions

 __construct (ilSetting $setting=null, ilRPCServerSettings $rpcSettings=null)
 
 validate ()
 

Private Attributes

 $setting
 
 $rpcSettings
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilCertificateActiveValidator::__construct ( ilSetting  $setting = null,
ilRPCServerSettings  $rpcSettings = null 
)
Parameters
ilSetting | null$setting
ilRPCServerSettings | null$rpcSettings

Definition at line 23 of file class.ilCertificateActiveValidator.php.

References $rpcSettings, $setting, and ilRPCServerSettings\getInstance().

24  {
25  if (null === $setting) {
26  $setting = new ilSetting("certificate");
27  }
28  $this->setting = $setting;
29 
30  if (null == $rpcSettings) {
31  $rpcSettings = ilRPCServerSettings::getInstance();
32  }
33  $this->rpcSettings = $rpcSettings;
34  }
static getInstance()
Get singelton instance.
+ Here is the call graph for this function:

Member Function Documentation

◆ validate()

ilCertificateActiveValidator::validate ( )

Definition at line 36 of file class.ilCertificateActiveValidator.php.

37  {
38  $globalCertificateActive = (bool) $this->setting->get('active');
39 
40  if (false === $globalCertificateActive) {
41  return false;
42  }
43 
44  $serverActive = (bool) $this->rpcSettings->isEnabled();
45 
46  if (false === $serverActive) {
47  return false;
48  }
49 
50  return true;
51  }

Field Documentation

◆ $rpcSettings

ilCertificateActiveValidator::$rpcSettings
private

Definition at line 17 of file class.ilCertificateActiveValidator.php.

Referenced by __construct().

◆ $setting

ilCertificateActiveValidator::$setting
private

Definition at line 12 of file class.ilCertificateActiveValidator.php.

Referenced by __construct().


The documentation for this class was generated from the following file: