ILIAS  release_7 Revision v7.30-3-g800a261c036
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
6
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",
35 "Id of the ILIAS client."
36 );
37 }
38 }
39}
An exception for terminatinating execution or to throw for unit testing.
collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage)
getTentativePreconditions(Setup\Environment $environment)
An environment holds resources to be used in the setup process.
Definition: Environment.php:12
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ini
Definition: raiseError.php:4
$client_id
Definition: webdav.php:17