ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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)
 
 getMetrics (Agent $agent)
 

Protected Member Functions

 configure ()
 
 execute (InputInterface $input, OutputInterface $output)
 

Static Protected Attributes

static $defaultName = "status"
 

Detailed Description

Command to output status information about the installation.

Definition at line 35 of file StatusCommand.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 42 of file StatusCommand.php.

References ILIAS\GlobalScreen\Provider\__construct().

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

Member Function Documentation

◆ configure()

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

Definition at line 48 of file StatusCommand.php.

References ILIAS\Setup\CLI\configureCommandForPlugins().

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

◆ execute()

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

Definition at line 55 of file StatusCommand.php.

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

55  : int
56  {
57  $agent = $this->getRelevantAgent($input);
58 
59  $output->write($this->getMetrics($agent)->toYAML() . "\n");
60 
61  return 0;
62  }
getRelevantAgent(InputInterface $input)
Definition: HasAgent.php:40
+ Here is the call graph for this function:

◆ getMetrics()

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

Definition at line 64 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().

64  : Metrics\Metric
65  {
66  // ATTENTION: Don't do this (in general), please have a look at the comment
67  // in ilIniFilesLoadedObjective.
69 
70  $environment = new ArrayEnvironment([]);
71  $storage = new Metrics\ArrayStorage();
72  $objective = new Tentatively(
73  $agent->getStatusObjective($storage)
74  );
75 
76  $this->achieveObjective($objective, $environment);
77 
78  $metric = $storage->asMetric();
79  list($config, $other) = $metric->extractByStability(Metrics\Metric::STABILITY_CONFIG);
80  if ($other) {
81  $values = $other->getValue();
82  } else {
83  $values = [];
84  }
85  if ($config) {
86  $values["config"] = $config;
87  }
88 
89  return new Metrics\Metric(
92  $values
93  );
94  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
const STABILITY_CONFIG
The stability of a metric tells how often we expect changes in the metric.
Definition: Metric.php:40
+ 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 40 of file StatusCommand.php.


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