ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilIniFilesPopulatedObjective Class Reference
+ Inheritance diagram for ilIniFilesPopulatedObjective:
+ Collaboration diagram for ilIniFilesPopulatedObjective:

Public Member Functions

 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
- Public Member Functions inherited from ilSetupObjective
 __construct (\ilSetupConfig $config)
 

Protected Member Functions

 getClientDir ()
 

Additional Inherited Members

- Protected Attributes inherited from ilSetupObjective
 $config
 

Detailed Description

Definition at line 7 of file class.ilIniFilesPopulatedObjective.php.

Member Function Documentation

◆ achieve()

ilIniFilesPopulatedObjective::achieve ( Setup\Environment  $environment)

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

38 : Setup\Environment
39 {
40 $path = dirname(__DIR__, 2) . "/ilias.ini.php";
41 $ini = new ilIniFile($path);
42 $ini->GROUPS = parse_ini_file(__DIR__ . "/../ilias.master.ini.php", true);
43 $ini->write();
44
45 $path = $this->getClientDir() . "/client.ini.php";
46 $client_ini = new ilIniFile($path);
47 $client_ini->GROUPS = parse_ini_file(__DIR__ . "/../client.master.ini.php", true);
48 $client_ini->write();
49
50 return $environment
51 ->withResource(Setup\Environment::RESOURCE_ILIAS_INI, $ini)
52 ->withResource(Setup\Environment::RESOURCE_CLIENT_INI, $client_ini);
53 }
INIFile Parser.
$ini
Definition: raiseError.php:4

References $ini, and getClientDir().

+ Here is the call graph for this function:

◆ getClientDir()

ilIniFilesPopulatedObjective::getClientDir ( )
protected

Definition at line 55 of file class.ilIniFilesPopulatedObjective.php.

55 : string
56 {
57 return dirname(__DIR__, 2) . "/data/" . $this->config->getClientId();
58 }

Referenced by achieve(), and getPreconditions().

+ Here is the caller graph for this function:

◆ getHash()

ilIniFilesPopulatedObjective::getHash ( )

Definition at line 9 of file class.ilIniFilesPopulatedObjective.php.

9 : string
10 {
11 return hash("sha256", self::class);
12 }

◆ getLabel()

ilIniFilesPopulatedObjective::getLabel ( )

Definition at line 14 of file class.ilIniFilesPopulatedObjective.php.

14 : string
15 {
16 return "The ilias.ini.php and client.ini.php are populated.";
17 }

◆ getPreconditions()

ilIniFilesPopulatedObjective::getPreconditions ( Setup\Environment  $environment)

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

24 : array
25 {
26 // TODO: This shows an unfortunate connection between the webdir and the
27 // client.ini.php. Why does the client in reside in the webdir? If we
28 // remove the client-feature, the client-ini will go away...
29 return [
30 new \ilOverwritesExistingInstallationConfirmed($this->config),
31 new Setup\DirectoryCreatedObjective(dirname(__DIR__, 2) . "/data"),
32 new Setup\DirectoryCreatedObjective($this->getClientDir()),
33 new Setup\CanCreateFilesInDirectoryCondition($this->getClientDir()),
34 new Setup\CanCreateFilesInDirectoryCondition(dirname(__DIR__, 2)),
35 ];
36 }

References getClientDir().

+ Here is the call graph for this function:

◆ isNotable()

ilIniFilesPopulatedObjective::isNotable ( )

Definition at line 19 of file class.ilIniFilesPopulatedObjective.php.

19 : bool
20 {
21 return true;
22 }

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