ILIAS  release_8 Revision v8.24
class.ilLoggingSetupAgent.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22use ILIAS\Setup;
28use ILIAS\UI;
29
31{
32 use Setup\Agent\HasNoNamedObjective;
33
34 protected Factory $refinery;
35
36 public function __construct(Factory $refinery)
37 {
38 $this->refinery = $refinery;
39 }
40
44 public function hasConfig(): bool
45 {
46 return true;
47 }
48
53 {
54 return $this->refinery->custom()->transformation(function ($data) {
55 return new \ilLoggingSetupConfig(
56 $data["enable"] ?? false,
57 $data["path_to_logfile"] ?? null,
58 $data["errorlog_dir"] ?? null
59 );
60 });
61 }
62
67 {
69 }
70
74 public function getUpdateObjective(Config $config = null): Objective
75 {
76 $objective = new Setup\Objective\NullObjective();
77 if ($config !== null) {
79 }
81 'Update of Services/Logging',
82 false,
83 $objective,
86 )
87 );
88 }
89
94 {
96 }
97
101 public function getStatusObjective(Storage $storage): Objective
102 {
103 return new ilLoggingMetricsCollectedObjective($storage);
104 }
105
109 public function getMigrations(): array
110 {
111 return [];
112 }
113}
Builds data types.
Definition: Factory.php:21
A objective collection is a objective that is achieved once all subobjectives are achieved.
A non-objective, nothing to do to achieve it...
This class attempt to achieve a set of database update steps.
__construct(Factory $refinery)
getUpdateObjective(Config $config=null)
getInstallObjective(Config $config=null)
getStatusObjective(Storage $storage)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A transformation is a function from one datatype to another.
A agent is some component that performs part of the setup process.
Definition: Agent.php:30
A configuration for the setup.
Definition: Config.php:27
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...