ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\Setup\CLI\StatusCommand Class Reference

Command to output status information about the installation. More...

+ Inheritance diagram for ILIAS\Setup\CLI\StatusCommand:
+ Collaboration diagram for ILIAS\Setup\CLI\StatusCommand:

Public Member Functions

 __construct (AgentFinder $agent_finder)
 
 configure ()
 
 execute (InputInterface $input, OutputInterface $output)
 
 getMetrics (Agent $agent)
 

Static Protected Attributes

static $defaultName = "status"
 

Detailed Description

Command to output status information about the installation.

Definition at line 18 of file StatusCommand.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Setup\CLI\StatusCommand::__construct ( AgentFinder  $agent_finder)

Definition at line 25 of file StatusCommand.php.

References ILIAS\GlobalScreen\Provider\__construct().

26  {
28  $this->agent_finder = $agent_finder;
29  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ configure()

ILIAS\Setup\CLI\StatusCommand::configure ( )

Definition at line 31 of file StatusCommand.php.

References ILIAS\Setup\CLI\configureCommandForPlugins().

32  {
33  $this->setDescription("Collect and show status information about the installation.");
35  }
configureCommandForPlugins()
Definition: HasAgent.php:21
+ Here is the call graph for this function:

◆ execute()

ILIAS\Setup\CLI\StatusCommand::execute ( InputInterface  $input,
OutputInterface  $output 
)

Definition at line 38 of file StatusCommand.php.

References ILIAS\Setup\CLI\StatusCommand\getMetrics(), and ILIAS\Setup\CLI\getRelevantAgent().

39  {
40  $agent = $this->getRelevantAgent($input);
41 
42  $output->write($this->getMetrics($agent)->toYAML() . "\n");
43  }
getRelevantAgent(InputInterface $input)
Definition: HasAgent.php:28
+ Here is the call graph for this function:

◆ getMetrics()

ILIAS\Setup\CLI\StatusCommand::getMetrics ( Agent  $agent)

Definition at line 45 of file StatusCommand.php.

References $config, ilIniFilesLoadedObjective\$might_populate_ini_files_as_well, ILIAS\Setup\Agent\getStatusObjective(), ILIAS\Setup\Metrics\Metric\STABILITY_CONFIG, ILIAS\Setup\Metrics\Metric\STABILITY_MIXED, and ILIAS\Setup\Metrics\Metric\TYPE_COLLECTION.

Referenced by ILIAS\Setup\CLI\StatusCommand\execute().

45  : Metrics\Metric
46  {
47  // ATTENTION: Don't do this (in general), please have a look at the comment
48  // in ilIniFilesLoadedObjective.
50 
51  $environment = new ArrayEnvironment([]);
52  $storage = new Metrics\ArrayStorage();
53  $objective = new Tentatively(
54  $agent->getStatusObjective($storage)
55  );
56 
57  $this->achieveObjective($objective, $environment);
58 
59  $metric = $storage->asMetric();
60  list($config, $other) = $metric->extractByStability(Metrics\Metric::STABILITY_CONFIG);
61  if ($other) {
62  $values = $other->getValue();
63  } else {
64  $values = [];
65  }
66  if ($config) {
67  $values["config"] = $config;
68  }
69 
70  return new Metrics\Metric(
73  $values
74  );
75  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68
const STABILITY_CONFIG
The stability of a metric tells how often we expect changes in the metric.
Definition: Metric.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $defaultName

ILIAS\Setup\CLI\StatusCommand::$defaultName = "status"
staticprotected

Definition at line 23 of file StatusCommand.php.


The documentation for this class was generated from the following file: