ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 @inheritDoc More...
 
- 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 23 of file class.ilGlobalCacheAllFlushedObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilGlobalCacheAllFlushedObjective::__construct ( private \ilGlobalCacheSettingsAdapter  $cache_settings_adapter)

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

26 {
27 }

Member Function Documentation

◆ achieve()

ilGlobalCacheAllFlushedObjective::achieve ( Environment  $environment)

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

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

References ILIAS\Setup\Environment\getResource().

+ Here is the call graph for this function:

◆ getHash()

ilGlobalCacheAllFlushedObjective::getHash ( )

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

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

◆ getLabel()

ilGlobalCacheAllFlushedObjective::getLabel ( )

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

34 : string
35 {
36 return "All global caches flushed";
37 }

◆ getPreconditions()

ilGlobalCacheAllFlushedObjective::getPreconditions ( Environment  $environment)

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

44 : array
45 {
46 return [
48 ];
49 }

◆ isApplicable()

ilGlobalCacheAllFlushedObjective::isApplicable ( Environment  $environment)

@inheritDoc

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

67 : bool
68 {
69 return true;
70 }

◆ isNotable()

ilGlobalCacheAllFlushedObjective::isNotable ( )

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

39 : bool
40 {
41 return true;
42 }

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