ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilUtilitiesMetricsCollectedObjective.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 use ILIAS\Setup;
22 
23 class ilUtilitiesMetricsCollectedObjective extends Setup\Metrics\CollectedObjective
24 {
25  protected function getTentativePreconditions(Setup\Environment $environment): array
26  {
27  return [
29  ];
30  }
31 
32  protected function collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage): void
33  {
34  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
35  if (!$ini) {
36  return;
37  }
38 
39  $storage->storeConfigText(
40  "path_to_convert",
41  $ini->readVariable("tools", "convert"),
42  "The path to the binary from imagemagick that is used to convert images."
43  );
44  $storage->storeConfigText(
45  "path_to_zip",
46  $ini->readVariable("tools", "zip"),
47  "The path to the binary that is used for zipping files."
48  );
49  $storage->storeConfigText(
50  "path_to_unzip",
51  $ini->readVariable("tools", "unzip"),
52  "The path to the binary that is used for unzipping files."
53  );
54  }
55 }
collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
An environment holds resources to be used in the setup process.
Definition: Environment.php:27
$ini
Definition: raiseError.php:4