ILIAS  release_8 Revision v8.24
ilFileSystemConfigNotChangedObjective Class Reference
+ Inheritance diagram for ilFileSystemConfigNotChangedObjective:
+ Collaboration diagram for ilFileSystemConfigNotChangedObjective:

Public Member Functions

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

Protected Attributes

ilFileSystemSetupConfig $config
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilFileSystemConfigNotChangedObjective::__construct ( \ilFileSystemSetupConfig  $config)

Definition at line 22 of file class.ilFileSystemConfigNotChangedObjective.php.

24 {
25 $this->config = $config;
26 }

References $config.

Member Function Documentation

◆ achieve()

ilFileSystemConfigNotChangedObjective::achieve ( Setup\Environment  $environment)

Definition at line 54 of file class.ilFileSystemConfigNotChangedObjective.php.

54 : Setup\Environment
55 {
56 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
57
58 $current = $ini->readVariable("clients", "datadir");
59 $new = $this->config->getDataDir();
60 if ($current !== $new) {
61 throw new Setup\UnachievableException(
62 "You seem to try to move the ILIAS data-directory from '$current' " .
63 "to '$new', the client.ini.php contains a different path then the " .
64 "config you are using. This is not supported by the setup."
65 );
66 }
67
68 return $environment;
69 }
$ini
Definition: raiseError.php:4

References $ini.

◆ getHash()

ilFileSystemConfigNotChangedObjective::getHash ( )

Definition at line 28 of file class.ilFileSystemConfigNotChangedObjective.php.

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

◆ getLabel()

ilFileSystemConfigNotChangedObjective::getLabel ( )

Definition at line 33 of file class.ilFileSystemConfigNotChangedObjective.php.

33 : string
34 {
35 return "Config for Filesystems did not change.";
36 }

◆ getPreconditions()

ilFileSystemConfigNotChangedObjective::getPreconditions ( Setup\Environment  $environment)
Returns
\ilFileSystemDirectoriesCreatedObjective[]|\ilIniFilesLoadedObjective[]

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

◆ isApplicable()

ilFileSystemConfigNotChangedObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 74 of file class.ilFileSystemConfigNotChangedObjective.php.

74 : bool
75 {
76 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
77
78 return $ini->readVariable("clients", "datadir") !== $this->config->getDataDir();
79 }

References $ini.

◆ isNotable()

ilFileSystemConfigNotChangedObjective::isNotable ( )

Definition at line 38 of file class.ilFileSystemConfigNotChangedObjective.php.

38 : bool
39 {
40 return false;
41 }

Field Documentation

◆ $config

ilFileSystemSetupConfig ilFileSystemConfigNotChangedObjective::$config
protected

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

Referenced by __construct().


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