ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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)
 

Protected Attributes

ilFileSystemSetupConfig $config
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilFileSystemConfigNotChangedObjective::__construct ( \ilFileSystemSetupConfig  $config)

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

References $config.

27  {
28  $this->config = $config;
29  }

Member Function Documentation

◆ achieve()

ilFileSystemConfigNotChangedObjective::achieve ( Setup\Environment  $environment)

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

References $ini.

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

◆ getHash()

ilFileSystemConfigNotChangedObjective::getHash ( )

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

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

◆ getLabel()

ilFileSystemConfigNotChangedObjective::getLabel ( )

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

36  : string
37  {
38  return "Config for Filesystems did not change.";
39  }

◆ getPreconditions()

ilFileSystemConfigNotChangedObjective::getPreconditions ( Setup\Environment  $environment)

◆ isApplicable()

ilFileSystemConfigNotChangedObjective::isApplicable ( Setup\Environment  $environment)

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

References $ini.

77  : bool
78  {
79  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
80 
81  return $ini->readVariable("clients", "datadir") !== $this->config->getDataDir();
82  }
$ini
Definition: raiseError.php:4

◆ isNotable()

ilFileSystemConfigNotChangedObjective::isNotable ( )

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

41  : bool
42  {
43  return false;
44  }

Field Documentation

◆ $config

ilFileSystemSetupConfig ilFileSystemConfigNotChangedObjective::$config
protected

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

Referenced by __construct().


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