@@ 19-29 (lines=11) @@ | ||
16 | ||
17 | const COMMAND = 'magium:configuration:get'; |
|
18 | ||
19 | protected function configure() |
|
20 | { |
|
21 | $this |
|
22 | ->setName(self::COMMAND) |
|
23 | ->setDescription('Get a configuration value') |
|
24 | ->setHelp("This command retrieves a value for a specific configuration path") |
|
25 | ; |
|
26 | $this->addOption('use-flag', 'f', InputOption::VALUE_NONE, 'Get value as flag'); |
|
27 | $this->addArgument('path', InputArgument::REQUIRED, 'Configuration Path'); |
|
28 | $this->addArgument('context', InputArgument::OPTIONAL, 'Configuration Context', ConfigurationRepository::CONTEXT_DEFAULT); |
|
29 | } |
|
30 | ||
31 | protected function getValueFlag(ConfigInterface $config, $path) |
|
32 | { |
@@ 16-27 (lines=12) @@ | ||
13 | ||
14 | const COMMAND = 'magium:configuration:set'; |
|
15 | ||
16 | protected function configure() |
|
17 | { |
|
18 | $this |
|
19 | ->setName(self::COMMAND) |
|
20 | ->setDescription('Set a configuration value') |
|
21 | ->setHelp("This command sets a value for a specific configuration path") |
|
22 | ; |
|
23 | ||
24 | $this->addArgument('path', InputArgument::REQUIRED, 'Configuration Path'); |
|
25 | $this->addArgument('value', InputArgument::OPTIONAL, 'Value'); |
|
26 | $this->addArgument('context', InputArgument::OPTIONAL, 'Configuration Context', ConfigurationRepository::CONTEXT_DEFAULT); |
|
27 | } |
|
28 | ||
29 | ||
30 | protected function execute(InputInterface $input, OutputInterface $output) |