ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilLoggingSetupAgent.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;
7 use ILIAS\UI;
8 
9 class ilLoggingSetupAgent implements Setup\Agent
10 {
12 
16  protected $refinery;
17 
18  public function __construct(
20  ) {
21  $this->refinery = $refinery;
22  }
23 
27  public function hasConfig() : bool
28  {
29  return true;
30  }
31 
36  {
37  return $this->refinery->custom()->transformation(function ($data) {
38  return new \ilLoggingSetupConfig(
39  $data["enable"] ?? false,
40  $data["path_to_logfile"] ?? null,
41  $data["errorlog_dir"] ?? null
42  );
43  });
44  }
45 
49  public function getInstallObjective(Setup\Config $config = null) : Setup\Objective
50  {
52  }
53 
57  public function getUpdateObjective(Setup\Config $config = null) : Setup\Objective
58  {
59  if ($config !== null) {
61  }
62  return new Setup\Objective\NullObjective();
63  }
64 
68  public function getBuildArtifactObjective() : Setup\Objective
69  {
70  return new Setup\Objective\NullObjective();
71  }
72 
76  public function getStatusObjective(Setup\Metrics\Storage $storage) : Setup\Objective
77  {
78  return new ilLoggingMetricsCollectedObjective($storage);
79  }
80 
84  public function getMigrations() : array
85  {
86  return [];
87  }
88 }
$data
Definition: storeScorm.php:23
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:14
__construct(Refinery\Factory $refinery)
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68
getStatusObjective(Setup\Metrics\Storage $storage)
getInstallObjective(Setup\Config $config=null)
Builds data types.
Definition: Factory.php:19
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getUpdateObjective(Setup\Config $config=null)
A transformation is a function from one datatype to another.
A configuration for the setup.
Definition: Config.php:10