ILIAS  release_7 Revision v7.30-3-g800a261c036
ilUtilitiesConfigStoredObjective Class Reference

Stores configuration for the Utilities service (paths to various tools) in the according ini-fields. More...

+ Inheritance diagram for ilUtilitiesConfigStoredObjective:
+ Collaboration diagram for ilUtilitiesConfigStoredObjective:

Public Member Functions

 __construct (\ilUtilitiesSetupConfig $config)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 @inheritDoc More...
 

Protected Attributes

 $config
 

Detailed Description

Stores configuration for the Utilities service (paths to various tools) in the according ini-fields.

Definition at line 11 of file class.ilUtilitiesConfigStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilUtilitiesConfigStoredObjective::__construct ( \ilUtilitiesSetupConfig  $config)

Member Function Documentation

◆ achieve()

ilUtilitiesConfigStoredObjective::achieve ( Setup\Environment  $environment)

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

46 : Setup\Environment
47 {
48 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
49
50 $ini->setVariable("tools", "convert", $this->config->getPathToConvert());
51 $ini->setVariable("tools", "zip", $this->config->getPathToZip());
52 $ini->setVariable("tools", "unzip", $this->config->getPathToUnzip());
53
54 if (!$ini->write()) {
55 throw new Setup\UnachievableException("Could not write ilias.ini.php");
56 }
57
58 return $environment;
59 }
$ini
Definition: raiseError.php:4

References $ini.

◆ getHash()

ilUtilitiesConfigStoredObjective::getHash ( )

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

24 : string
25 {
26 return hash("sha256", self::class);
27 }

◆ getLabel()

ilUtilitiesConfigStoredObjective::getLabel ( )

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

29 : string
30 {
31 return "Store configuration of Services/Utilities";
32 }

◆ getPreconditions()

ilUtilitiesConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

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

39 : array
40 {
41 return [
43 ];
44 }

◆ isApplicable()

ilUtilitiesConfigStoredObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 64 of file class.ilUtilitiesConfigStoredObjective.php.

64 : bool
65 {
66 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
67
68 return
69 $ini->readVariable("tools", "convert") !== $this->config->getPathToConvert() ||
70 $ini->readVariable("tools", "zip") !== $this->config->getPathToZip() ||
71 $ini->readVariable("tools", "unzip") !== $this->config->getPathToUnzip()
72 ;
73 }

References $ini.

◆ isNotable()

ilUtilitiesConfigStoredObjective::isNotable ( )

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

34 : bool
35 {
36 return false;
37 }

Field Documentation

◆ $config

ilUtilitiesConfigStoredObjective::$config
protected

Definition at line 16 of file class.ilUtilitiesConfigStoredObjective.php.

Referenced by __construct().


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