ILIAS  release_7 Revision v7.30-3-g800a261c036
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

 $config
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilFileSystemConfigNotChangedObjective::__construct ( \ilFileSystemSetupConfig  $config)

Member Function Documentation

◆ achieve()

ilFileSystemConfigNotChangedObjective::achieve ( Setup\Environment  $environment)

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

44 : Setup\Environment
45 {
46 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
47
48 $current = $ini->readVariable("clients", "datadir");
49 $new = $this->config->getDataDir();
50 if ($current !== $new) {
51 throw new Setup\UnachievableException(
52 "You seem to try to move the ILIAS data-directory from '$current' " .
53 "to '$new', the client.ini.php contains a different path then the " .
54 "config you are using. This is not supported by the setup."
55 );
56 }
57
58 return $environment;
59 }
$ini
Definition: raiseError.php:4

References $ini.

◆ getHash()

ilFileSystemConfigNotChangedObjective::getHash ( )

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

21 : string
22 {
23 return hash("sha256", self::class);
24 }

◆ getLabel()

ilFileSystemConfigNotChangedObjective::getLabel ( )

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

26 : string
27 {
28 return "Config for Filesystems did not change.";
29 }

◆ getPreconditions()

ilFileSystemConfigNotChangedObjective::getPreconditions ( Setup\Environment  $environment)

◆ isApplicable()

ilFileSystemConfigNotChangedObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

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

64 : bool
65 {
66 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
67
68 return $ini->readVariable("clients", "datadir") !== $this->config->getDataDir();
69 }

References $ini.

◆ isNotable()

ilFileSystemConfigNotChangedObjective::isNotable ( )

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

31 : bool
32 {
33 return false;
34 }

Field Documentation

◆ $config

ilFileSystemConfigNotChangedObjective::$config
protected

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

Referenced by __construct().


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