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