ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLoggingSetupAgent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use ILIAS\Setup;
27use ILIAS\UI;
28
30{
31 use Setup\Agent\HasNoNamedObjective;
32
33 protected Factory $refinery;
34
35 public function __construct(Factory $refinery)
36 {
37 $this->refinery = $refinery;
38 }
39
43 public function hasConfig(): bool
44 {
45 return true;
46 }
47
52 {
53 return $this->refinery->custom()->transformation(function ($data) {
54 return new \ilLoggingSetupConfig(
55 $data["enable"] ?? false,
56 $data["path_to_logfile"] ?? null,
57 $data["errorlog_dir"] ?? null
58 );
59 });
60 }
61
65 public function getInstallObjective(?Config $config = null): Objective
66 {
67 return new ilLoggingConfigStoredObjective($config);
68 }
69
73 public function getUpdateObjective(?Config $config = null): Objective
74 {
75 $objective = new Setup\Objective\NullObjective();
76 if ($config !== null) {
77 $objective = new ilLoggingConfigStoredObjective($config);
78 }
80 'Update of Services/Logging',
81 false,
82 $objective,
85 )
86 );
87 }
88
92 public function getBuildObjective(): Objective
93 {
95 }
96
100 public function getStatusObjective(Storage $storage): Objective
101 {
102 return new Setup\ObjectiveCollection(
103 'Component Logging',
104 true,
107 );
108 }
109
113 public function getMigrations(): array
114 {
115 return [];
116 }
117}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
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.
getInstallObjective(?Config $config=null)
getUpdateObjective(?Config $config=null)
__construct(Factory $refinery)
getStatusObjective(Storage $storage)
Class ilLoggingUpdateSteps8 contains update steps for release 8.
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
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...