ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilGlobalCacheAllFlushedObjective Class Reference
+ Inheritance diagram for ilGlobalCacheAllFlushedObjective:
+ Collaboration diagram for ilGlobalCacheAllFlushedObjective:

Public Member Functions

 __construct (private \ilGlobalCacheSettingsAdapter $cache_settings_adapter)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Environment $environment)
 
 achieve (Environment $environment)
 
 isApplicable (Environment $environment)
 
- Public Member Functions inherited from ilSetupObjective
 __construct (Setup\Config $config)
 

Additional Inherited Members

- Protected Attributes inherited from ilSetupObjective
Setup Config $config
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilGlobalCacheAllFlushedObjective::__construct ( private \ilGlobalCacheSettingsAdapter  $cache_settings_adapter)

Definition at line 27 of file class.ilGlobalCacheAllFlushedObjective.php.

28  {
29  }

Member Function Documentation

◆ achieve()

ilGlobalCacheAllFlushedObjective::achieve ( Environment  $environment)

Definition at line 53 of file class.ilGlobalCacheAllFlushedObjective.php.

References ILIAS\Setup\Environment\getResource().

53  : Environment
54  {
55  $client_ini = $environment->getResource(Environment::RESOURCE_CLIENT_INI);
56  if ($client_ini === null) {
57  throw new UnexpectedValueException("Client ini not found");
58  }
59  $this->cache_settings_adapter->readFromIniFile($client_ini);
60  $services = new Services($this->cache_settings_adapter->getConfig());
61  $services->flushAdapter();
62 
63  return $environment;
64  }
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
An environment holds resources to be used in the setup process.
Definition: Environment.php:27
+ Here is the call graph for this function:

◆ getHash()

ilGlobalCacheAllFlushedObjective::getHash ( )

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

31  : string
32  {
33  return hash("sha256", self::class);
34  }

◆ getLabel()

ilGlobalCacheAllFlushedObjective::getLabel ( )

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

36  : string
37  {
38  return "All global caches flushed";
39  }

◆ getPreconditions()

ilGlobalCacheAllFlushedObjective::getPreconditions ( Environment  $environment)

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

46  : array
47  {
48  return [
50  ];
51  }

◆ isApplicable()

ilGlobalCacheAllFlushedObjective::isApplicable ( Environment  $environment)

Definition at line 69 of file class.ilGlobalCacheAllFlushedObjective.php.

69  : bool
70  {
71  return true;
72  }

◆ isNotable()

ilGlobalCacheAllFlushedObjective::isNotable ( )

Definition at line 41 of file class.ilGlobalCacheAllFlushedObjective.php.

41  : bool
42  {
43  return true;
44  }

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