ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilNICKeyStoredObjective Class Reference
+ Inheritance diagram for ilNICKeyStoredObjective:
+ Collaboration diagram for ilNICKeyStoredObjective:

Public Member Functions

 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
- Public Member Functions inherited from ilSetupObjective
 __construct (\ilSetupConfig $config)
 

Protected Member Functions

 generateNICKey ()
 

Additional Inherited Members

- Protected Attributes inherited from ilSetupObjective
 $config
 

Detailed Description

Definition at line 7 of file class.ilNICKeyStoredObjective.php.

Member Function Documentation

◆ achieve()

ilNICKeyStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 31 of file class.ilNICKeyStoredObjective.php.

References $factory, and generateNICKey().

31  : Setup\Environment
32  {
33  $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
34  $settings = $factory->settingsFor("common");
35 
36  if ($settings->get("nic_key")) {
37  return $environment;
38  }
39 
40  $nic_key = $this->generateNICKey();
41  $settings->set("nic_key", $nic_key);
42 
43  return $environment;
44  }
$factory
Definition: metadata.php:58
+ Here is the call graph for this function:

◆ generateNICKey()

ilNICKeyStoredObjective::generateNICKey ( )
protected

Definition at line 46 of file class.ilNICKeyStoredObjective.php.

Referenced by achieve().

47  {
48  return md5(uniqid($this->getClientId(), true));
49  }
+ Here is the caller graph for this function:

◆ getHash()

ilNICKeyStoredObjective::getHash ( )

Definition at line 9 of file class.ilNICKeyStoredObjective.php.

9  : string
10  {
11  return hash("sha256", self::class);
12  }

◆ getLabel()

ilNICKeyStoredObjective::getLabel ( )

Definition at line 14 of file class.ilNICKeyStoredObjective.php.

14  : string
15  {
16  return "A NIC key for the installation is generated and stored";
17  }

◆ getPreconditions()

ilNICKeyStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 24 of file class.ilNICKeyStoredObjective.php.

24  : array
25  {
26  return [
27  new \ilSettingsFactoryExistsObjective()
28  ];
29  }

◆ isNotable()

ilNICKeyStoredObjective::isNotable ( )

Definition at line 19 of file class.ilNICKeyStoredObjective.php.

19  : bool
20  {
21  return true;
22  }

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