ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilIniFilesLoadedObjective.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
6
8{
9 public function getHash() : string
10 {
11 return hash("sha256", self::class);
12 }
13
14 public function getLabel() : string
15 {
16 return "The ilias.ini.php and client.ini.php are loaded";
17 }
18
19 public function isNotable() : bool
20 {
21 return false;
22 }
23
24 public function getPreconditions(Setup\Environment $environment) : array
25 {
26 return [];
27 }
28
29 public function achieve(Setup\Environment $environment) : Setup\Environment
30 {
31 $path = dirname(__DIR__, 2) . "/ilias.ini.php";
32 $ini = new ilIniFile($path);
33
34 $path = $this->getClientDir() . "/client.ini.php";
35 $client_ini = new ilIniFile($path);
36
37 return $environment
38 ->withResource(Setup\Environment::RESOURCE_ILIAS_INI, $ini)
39 ->withResource(Setup\Environment::RESOURCE_CLIENT_INI, $client_ini);
40 }
41
42 protected function getClientDir() : string
43 {
44 return dirname(__DIR__, 2) . "/data/" . $this->config->getClientId();
45 }
46}
An exception for terminatinating execution or to throw for unit testing.
INIFile Parser.
achieve(Setup\Environment $environment)
getPreconditions(Setup\Environment $environment)
An environment holds resources to be used in the setup process.
Definition: Environment.php:12
$ini
Definition: raiseError.php:4