ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilFileSystemSetupAgent.php
Go to the documentation of this file.
1 <?php
2 
3 use ILIAS\Setup;
5 use ILIAS\Data;
6 use ILIAS\UI;
7 
8 /******************************************************************************
9  *
10  * This file is part of ILIAS, a powerful learning management system.
11  *
12  * ILIAS is licensed with the GPL-3.0, you should have received a copy
13  * of said license along with the source code.
14  *
15  * If this is not the case or you just want to try ILIAS, you'll find
16  * us at:
17  * https://www.ilias.de
18  * https://github.com/ILIAS-eLearning
19  *
20  *****************************************************************************/
21 class ilFileSystemSetupAgent implements Setup\Agent
22 {
24 
25  protected Refinery\Factory $refinery;
26 
27  public function __construct(
28  Refinery\Factory $refinery
29  ) {
30  $this->refinery = $refinery;
31  }
32 
36  public function hasConfig(): bool
37  {
38  return true;
39  }
40 
45  {
46  return $this->refinery->custom()->transformation(fn ($data): \ilFileSystemSetupConfig => new \ilFileSystemSetupConfig(
47  $data["data_dir"]
48  ));
49  }
50 
54  public function getInstallObjective(Setup\Config $config = null): Setup\Objective
55  {
58  }
59 
63  public function getUpdateObjective(Setup\Config $config = null): Setup\Objective
64  {
65  if ($config) {
68  }
69  return new Setup\Objective\NullObjective();
70  }
71 
75  public function getBuildArtifactObjective(): Setup\Objective
76  {
77  return new Setup\Objective\NullObjective();
78  }
79 
83  public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
84  {
85  return new ilFileSystemMetricsCollectedObjective($storage);
86  }
87 
91  public function getMigrations(): array
92  {
93  return [];
94  }
95 }
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: ByTrying.php:21
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
getUpdateObjective(Setup\Config $config=null)
getInstallObjective(Setup\Config $config=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Refinery\Factory $refinery)
A transformation is a function from one datatype to another.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getStatusObjective(Setup\Metrics\Storage $storage)
A configuration for the setup.
Definition: Config.php:26