ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSetupMetricsCollectedObjective.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 
5 use ILIAS\Setup;
6 
7 class ilSetupMetricsCollectedObjective extends Setup\Metrics\CollectedObjective
8 {
9  public function getLabel() : string
10  {
11  return "Collect common metrics for the ILIAS installation.";
12  }
13 
14  public function getTentativePreconditions(Setup\Environment $environment) : array
15  {
16  return [
18  ];
19  }
20 
21  public function collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage) : void
22  {
23  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
24  $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
25  $storage->storeStableBool(
26  "is_installed",
27  $ini !== null && $client_ini !== null,
28  "Are there any indications an installation was performed?"
29  );
30  $client_id = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_ID);
31  if ($client_id) {
32  $storage->storeConfigText(
33  "client_id",
34  $client_id,
35  "Id of the ILIAS client."
36  );
37  }
38  }
39 }
$client_id
Definition: webdav.php:17
getTentativePreconditions(Setup\Environment $environment)
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:11
collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage)
$ini
Definition: raiseError.php:4