ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
BuildArtifactsCommand.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 2016 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3
4namespace ILIAS\Setup\CLI;
5
11use Symfony\Component\Console\Input\InputInterface;
12use Symfony\Component\Console\Input\InputOption;
13
18{
19 protected static $defaultName = "build-artifacts";
20
21 public function configure()
22 {
23 $this
24 ->setDescription("Build static artifacts from source")
25 ->addOption("yes", "y", InputOption::VALUE_NONE, "Confirm every message of the setup.");
26 }
27
28 protected function printIntroMessage(IOWrapper $io)
29 {
30 $io->title("Building static artifacts");
31 }
32
33 protected function printOutroMessage(IOWrapper $io)
34 {
35 $io->success("All static artifacts are build!");
36 }
37
38 protected function readAgentConfig(Agent $agent, InputInterface $input) : ?Config
39 {
40 return null;
41 }
42
44 {
45 return new ArrayEnvironment([]);
46 }
47
49 {
50 return $agent->getBuildArtifactObjective();
51 }
52}
An exception for terminatinating execution or to throw for unit testing.
Command base class.
Definition: BaseCommand.php:24
readAgentConfig(Agent $agent, InputInterface $input)
buildEnvironment(Agent $agent, ?Config $config, IOWrapper $io)
getObjective(Agent $agent, ?Config $config)
Wrapper around symfonies input and output facilities to provide just the functionality required for t...
Definition: IOWrapper.php:17
success(string $text)
Definition: IOWrapper.php:91
title(string $title)
Definition: IOWrapper.php:86
A agent is some component that performs part of the setup process.
Definition: Agent.php:14
A configuration for the setup.
Definition: Config.php:11
An environment holds resources to be used in the setup process.
Definition: Environment.php:12
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:15
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68