/** * set config * * @return array */ protected function _setConfig(Zend_Console_Getopt $_opts) { $options = $this->_parseRemainingArgs($_opts->getRemainingArgs()); $errors = array(); if (empty($options['configkey'])) { $errors[] = 'Missing argument: configkey'; } if (empty($options['configvalue'])) { $errors[] = 'Missing argument: configvalue'; } $configKey = (string) $options['configkey']; $configValue = self::parseConfigValue($options['configvalue']); if (empty($errors)) { Setup_Controller::setConfigOption($configKey, $configValue); echo "OK - Updated configuration option {$configKey}\n"; } else { echo "ERRORS - The following errors occured: \n"; foreach ($errors as $error) { echo "- " . $error . "\n"; } } }