ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilLoggingMetricsCollectedObjective Class Reference
+ Inheritance diagram for ilLoggingMetricsCollectedObjective:
+ Collaboration diagram for ilLoggingMetricsCollectedObjective:

Protected Member Functions

 getTentativePreconditions (Environment $environment)
 
 collectFrom (Environment $environment, Storage $storage)
 
- Protected Member Functions inherited from ILIAS\Setup\Metrics\CollectedObjective
 collectFrom (Setup\Environment $environment, Storage $storage)
 Attempt to gather metrics based on the provided environment. More...
 
 getTentativePreconditions (Setup\Environment $environment)
 Give preconditions that might or might not be fullfilled. More...
 

Additional Inherited Members

- Public Member Functions inherited from ILIAS\Setup\Metrics\CollectedObjective
 __construct (Storage $storage)
 
 getHash ()
 Get a hash for this objective. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 
- Public Member Functions inherited from ILIAS\Setup\Objective
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 
- Protected Attributes inherited from ILIAS\Setup\Metrics\CollectedObjective
Storage $storage
 

Detailed Description

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

Member Function Documentation

◆ collectFrom()

ilLoggingMetricsCollectedObjective::collectFrom ( Environment  $environment,
Storage  $storage 
)
protected

Definition at line 34 of file class.ilLoggingMetricsCollectedObjective.php.

References $ini, ILIAS\Setup\Environment\getResource(), ILIAS\Setup\Metrics\Storage\storeConfigBool(), and ILIAS\Setup\Metrics\Storage\storeConfigText().

34  : void
35  {
36  $ini = $environment->getResource(Environment::RESOURCE_ILIAS_INI);
37  if (!$ini) {
38  return;
39  }
40 
41  $storage->storeConfigBool(
42  "enable",
43  (bool) $ini->readVariable("log", "enabled"),
44  "Is the logging enabled on the installation?"
45  );
46  $storage->storeConfigText(
47  "path_to_logfile",
48  $ini->readVariable("log", "path") . "/" . $ini->readVariable("log", "file"),
49  "The path to the logfile."
50  );
51  $storage->storeConfigText(
52  "errorlog_dir",
53  $ini->readVariable("log", "error_path"),
54  "The path to the directory where error protocols are stored."
55  );
56  }
storeConfigBool(string $key, bool $value, ?string $description=null)
storeConfigText(string $key, string $value, ?string $description=null)
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
$ini
Definition: raiseError.php:20
+ Here is the call graph for this function:

◆ getTentativePreconditions()

ilLoggingMetricsCollectedObjective::getTentativePreconditions ( Environment  $environment)
protected

Definition at line 27 of file class.ilLoggingMetricsCollectedObjective.php.

27  : array
28  {
29  return [
31  ];
32  }

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