ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilGlobalCacheConfigStoredObjective Class Reference
+ Inheritance diagram for ilGlobalCacheConfigStoredObjective:
+ Collaboration diagram for ilGlobalCacheConfigStoredObjective:

Public Member Functions

 __construct (\ilGlobalCacheSettings $settings)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 

Protected Attributes

 $settings
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilGlobalCacheConfigStoredObjective::__construct ( \ilGlobalCacheSettings  $settings)

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

References $settings, and settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ achieve()

ilGlobalCacheConfigStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 42 of file class.ilGlobalCacheConfigStoredObjective.php.

References ActiveRecord\flushDB(), ILIAS\Setup\Environment\getResource(), and settings().

42  : Setup\Environment
43  {
44  $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
45 
47 
48  $memcached_nodes = $this->settings->getMemcachedNodes();
49  if (count($memcached_nodes) > 0) {
50  foreach ($memcached_nodes as $node) {
51  $node->create();
52  }
53  }
54 
55  $this->settings->writeToIniFile($client_ini);
56 
57  if (!$client_ini->write()) {
58  throw new Setup\UnachievableException("Could not write client.ini.php");
59  }
60 
61  return $environment;
62  }
settings()
Definition: settings.php:2
+ Here is the call graph for this function:

◆ getHash()

ilGlobalCacheConfigStoredObjective::getHash ( )

Definition at line 20 of file class.ilGlobalCacheConfigStoredObjective.php.

20  : string
21  {
22  return hash("sha256", self::class);
23  }

◆ getLabel()

ilGlobalCacheConfigStoredObjective::getLabel ( )

Definition at line 25 of file class.ilGlobalCacheConfigStoredObjective.php.

25  : string
26  {
27  return "Store configuration of Services/GlobalCache";
28  }

◆ getPreconditions()

ilGlobalCacheConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 35 of file class.ilGlobalCacheConfigStoredObjective.php.

35  : array
36  {
37  return [
39  ];
40  }

◆ isApplicable()

ilGlobalCacheConfigStoredObjective::isApplicable ( Setup\Environment  $environment)

Definition at line 67 of file class.ilGlobalCacheConfigStoredObjective.php.

67  : bool
68  {
69  // The effort to check the whole ini file is too big here.
70  return true;
71  }

◆ isNotable()

ilGlobalCacheConfigStoredObjective::isNotable ( )

Definition at line 30 of file class.ilGlobalCacheConfigStoredObjective.php.

30  : bool
31  {
32  return false;
33  }

Field Documentation

◆ $settings

ilGlobalCacheConfigStoredObjective::$settings
protected

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

Referenced by __construct().


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