ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLoggingConfigStoredObjective Class Reference
+ Inheritance diagram for ilLoggingConfigStoredObjective:
+ Collaboration diagram for ilLoggingConfigStoredObjective:

Public Member Functions

 __construct (\ilLoggingSetupConfig $config)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 

Protected Attributes

 $config
 

Detailed Description

Definition at line 8 of file class.ilLoggingConfigStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilLoggingConfigStoredObjective::__construct ( \ilLoggingSetupConfig  $config)

Definition at line 15 of file class.ilLoggingConfigStoredObjective.php.

References $config.

Member Function Documentation

◆ achieve()

ilLoggingConfigStoredObjective::achieve ( Setup\Environment  $environment)

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

References $ini.

44  : Setup\Environment
45  {
46  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
47 
48  $ini->setVariable("log", "enabled", $this->config->isEnabled() ? "1" : "0");
49  $ini->setVariable("log", "path", dirname($this->config->getPathToLogfile()));
50  $ini->setVariable("log", "file", basename($this->config->getPathToLogfile()));
51  $ini->setVariable("log", "error_path", $this->config->getErrorlogDir());
52 
53  if (!$ini->write()) {
54  throw new Setup\UnachievableException("Could not write ilias.ini.php");
55  }
56 
57  return $environment;
58  }
$ini
Definition: raiseError.php:4

◆ getHash()

ilLoggingConfigStoredObjective::getHash ( )

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

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

◆ getLabel()

ilLoggingConfigStoredObjective::getLabel ( )

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

26  : string
27  {
28  return "Fill ini with settings for Services/Logging";
29  }

◆ getPreconditions()

ilLoggingConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

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

36  : array
37  {
38  $common_config = $environment->getConfigFor("common");
39  return [
40  new ilIniFilesPopulatedObjective($common_config)
41  ];
42  }

◆ isNotable()

ilLoggingConfigStoredObjective::isNotable ( )

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

31  : bool
32  {
33  return false;
34  }

Field Documentation

◆ $config

ilLoggingConfigStoredObjective::$config
protected

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

Referenced by __construct().


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