protected function execute(InputInterface $input, OutputInterface $output)
{
$this->detectMagento($output, true);
if (!$this->initMagento()) {
return;
}
$config = $this->_getConfigModel();
if (!$config->getResourceModel()) {
// without a resource model, a config option can't be saved.
return;
}
$allowZeroScope = $input->getOption('force');
$scope = $input->getOption('scope');
$this->_validateScopeParam($scope);
$scopeId = $this->_convertScopeIdParam($scope, $input->getOption('scope-id'), $allowZeroScope);
$value = str_replace(array('\\n', '\\r'), array("\n", "\r"), $input->getArgument('value'));
$value = $this->_formatValue($value, $input->getOption('encrypt') ? 'encrypt' : false);
$config->saveConfig($input->getArgument('path'), $value, $scope, $scopeId);
$output->writeln('<comment>' . $input->getArgument('path') . "</comment> => <comment>" . $input->getArgument('value') . '</comment>');
}