ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
NullAgent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Setup\Agent;
22
28use ILIAS\Refinery\Factory as Refinery;
30
34class NullAgent implements Agent
35{
37
38 public function __construct(
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}
Builds data types.
Definition: Factory.php:36
An agent that just doesn't do a thing.
Definition: NullAgent.php:35
getNamedObjectives(?Config $config=null)
Gets all named objectives The keys of the returned array are the commands.
Definition: NullAgent.php:102
getStatusObjective(Metrics\Storage $storage)
@inheritdocs
Definition: NullAgent.php:89
getUpdateObjective(?Config $config=null)
@inheritdocs
Definition: NullAgent.php:73
getMigrations()
@inheritDoc
Definition: NullAgent.php:97
__construct(Refinery $refinery)
Definition: NullAgent.php:38
getInstallObjective(?Config $config=null)
@inheritdocs
Definition: NullAgent.php:65
getBuildObjective()
@inheritdocs
Definition: NullAgent.php:81
getArrayToConfigTransformation()
@inheritdocs
Definition: NullAgent.php:55
A non-objective, nothing to do to achieve it...
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