ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
NullAgent.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Setup\Agent;
22 
30 
34 class NullAgent implements Agent
35 {
36  protected Refinery $refinery;
37 
38  public function __construct(
39  Refinery $refinery
40  ) {
41  $this->refinery = $refinery;
42  }
43 
47  public function hasConfig(): bool
48  {
49  return false;
50  }
51 
56  {
57  throw new \LogicException(
58  self::class . " has no config."
59  );
60  }
61 
65  public function getInstallObjective(?Config $config = null): Objective
66  {
67  return new NullObjective();
68  }
69 
73  public function getUpdateObjective(?Config $config = null): Objective
74  {
75  return new NullObjective();
76  }
77 
81  public function getBuildObjective(): Objective
82  {
83  return new NullObjective();
84  }
85 
89  public function getStatusObjective(Metrics\Storage $storage): Objective
90  {
91  return new NullObjective();
92  }
93 
97  public function getMigrations(): array
98  {
99  return [];
100  }
101 
102  public function getNamedObjectives(?Config $config = null): array
103  {
104  return [];
105  }
106 }
An agent that just doesn&#39;t do a thing.
Definition: NullAgent.php:34
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
A non-objective, nothing to do to achieve it...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
A transformation is a function from one datatype to another.
A configuration for the setup.
Definition: Config.php:26