ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Setup\CLI\UpdateCommand Class Reference

Update command. More...

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

Public Member Functions

 configure ()
 
 execute (InputInterface $input, OutputInterface $output)
 
- Public Member Functions inherited from ILIAS\Setup\CLI\BaseCommand
 __construct (callable $lazy_agent, ConfigReader $config_reader, array $preconditions)
 
 configure ()
 
 execute (InputInterface $input, OutputInterface $output)
 

Protected Member Functions

 printIntroMessage (IOWrapper $io)
 
 printOutroMessage (IOWrapper $io)
 
 buildEnvironment (Agent $agent, ?Config $config, IOWrapper $io)
 
 getObjective (Agent $agent, ?Config $config)
 
- Protected Member Functions inherited from ILIAS\Setup\CLI\BaseCommand
 getAgent ()
 
 shouldSayYes (InputInterface $input)
 
 printLicenseMessage (IOWrapper $io, InputInterface $input)
 
 printIntroMessage (IOWrapper $io)
 
 printOutroMessage (IOWrapper $io)
 
 readAgentConfig (Agent $agent, InputInterface $input)
 
 buildEnvironment (Agent $agent, ?Config $config, IOWrapper $io)
 
 getObjective (Agent $agent, ?Config $config)
 

Static Protected Attributes

static $defaultName = "update"
 
- Static Protected Attributes inherited from ILIAS\Setup\CLI\BaseCommand
static $defaultName = "install"
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Setup\CLI\BaseCommand
 $lazy_agent
 
 $agent
 
 $config_reader
 
 $preconditions
 var Objective[] More...
 

Detailed Description

Update command.

Definition at line 21 of file UpdateCommand.php.

Member Function Documentation

◆ buildEnvironment()

ILIAS\Setup\CLI\UpdateCommand::buildEnvironment ( Agent  $agent,
?Config  $config,
IOWrapper  $io 
)
protected

Definition at line 43 of file UpdateCommand.php.

References ILIAS\Setup\Environment\RESOURCE_ACHIEVEMENT_TRACKER, ILIAS\Setup\Environment\RESOURCE_ADMIN_INTERACTION, and ILIAS\Setup\ArrayEnvironment\withConfigFor().

43  : Environment
44  {
45  $environment = new ArrayEnvironment([
47  // TODO: This needs to be implemented correctly...
48  Environment::RESOURCE_ACHIEVEMENT_TRACKER => new class implements AchievementTracker {
49  public function trackAchievementOf(Objective $objective) : void
50  {
51  }
52  public function isAchieved(Objective $objective) : bool
53  {
54  return false;
55  }
56  }
57  ]);
58 
59  if ($agent instanceof AgentCollection && $config) {
60  foreach ($config->getKeys() as $k) {
61  $environment = $environment->withConfigFor($k, $config->getConfig($k));
62  }
63  }
64 
65  return $environment;
66  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68
+ Here is the call graph for this function:

◆ configure()

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

Definition at line 25 of file UpdateCommand.php.

26  {
27  parent::configure();
28  $this
29  ->setDescription("Updates an existing ILIAS installation")
30  ->addOption("ignore-db-update-messages", null, InputOption::VALUE_NONE, "Ignore messages from the database update steps.");
31  }

◆ execute()

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

Definition at line 68 of file UpdateCommand.php.

69  {
70  // ATTENTION: This is a hack to get around the usage of the echo/exit pattern in
71  // the setup for the command line version of the setup. Do not use this.
72  if ($input->hasOption("ignore-db-update-messages") && $input->getOption("ignore-db-update-messages")) {
73  define("ILIAS_SETUP_IGNORE_DB_UPDATE_STEP_MESSAGES", true);
74  }
75  return parent::execute($input, $output);
76  }

◆ getObjective()

ILIAS\Setup\CLI\UpdateCommand::getObjective ( Agent  $agent,
?Config  $config 
)
protected

Definition at line 78 of file UpdateCommand.php.

References ILIAS\Setup\Agent\getUpdateObjective().

78  : Objective
79  {
80  return new ObjectiveCollection(
81  "Update ILIAS",
82  false,
83  $agent->getUpdateObjective($config)
84  );
85  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68
+ Here is the call graph for this function:

◆ printIntroMessage()

ILIAS\Setup\CLI\UpdateCommand::printIntroMessage ( IOWrapper  $io)
protected

Definition at line 33 of file UpdateCommand.php.

References ILIAS\Setup\CLI\IOWrapper\title().

34  {
35  $io->title("Updating ILIAS");
36  }
+ Here is the call graph for this function:

◆ printOutroMessage()

ILIAS\Setup\CLI\UpdateCommand::printOutroMessage ( IOWrapper  $io)
protected

Definition at line 38 of file UpdateCommand.php.

References ILIAS\Setup\CLI\IOWrapper\success().

39  {
40  $io->success("Update complete. Thanks and have fun!");
41  }
+ Here is the call graph for this function:

Field Documentation

◆ $defaultName

ILIAS\Setup\CLI\UpdateCommand::$defaultName = "update"
staticprotected

Definition at line 23 of file UpdateCommand.php.


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