本文整理汇总了PHP中Zend_Config_Writer_Ini类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Config_Writer_Ini类的具体用法?PHP Zend_Config_Writer_Ini怎么用?PHP Zend_Config_Writer_Ini使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Config_Writer_Ini类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexAction
public function indexAction()
{
$config = Zend_Registry::get('config');
/* @var $config Zend_Config */
if ($config->gandi->api->key) {
return $this->_helper->redirector('index', 'index');
}
$configFile = APPLICATION_PATH . '/configs/application.ini';
$config = new Zend_Config_Ini($configFile, null, array('skipExtends' => true, 'allowModifications' => true));
$request = $this->getRequest();
$form = new Application_Form_Install();
if ($this->getRequest()->isPost()) {
if ($form->isValid($request->getPost())) {
$formValues = $form->getValues();
// DEBUG
//Zend_Debug::dump($formValues); die();
$apiKey = $formValues['apikey'];
try {
if (!$apiKey) {
throw new Exception('Gandi API key can\'t be empty!');
}
if (!is_writable($configFile)) {
throw new Exception(sprintf('Config file is not writeable! Please check write right to %s file!', $configFile));
}
$config->development->gandi = array('api' => array('key' => $apiKey), 'account' => array('showdetails' => '0'), 'vm' => array('showdetails' => '0'));
$writer = new Zend_Config_Writer_Ini(array('config' => $config, 'filename' => $configFile));
$writer->write();
return $this->_helper->redirector('index', 'index');
} catch (Exception $e) {
echo $e->getMessage();
}
}
}
$this->view->form = $form;
}
示例2: configure
private function configure()
{
$zend_console = new Zend_Console_Getopt(array('create|c' => 'Create database configureation', 'adapter|a=w' => 'Database adapter (mysql)', 'host|h=w' => 'Default to localhost', 'username|u=w' => 'Username to connect to database', 'password|p=w' => 'Password to connect to database', 'database|d=w' => 'Database Name', 'port|o-i' => '(optional) Port for connecting to database', 'socket|s-w' => '(optional) Location for database socket'), $this->argv);
try {
echo $a = $zend_console->getOption('a');
echo $h = $zend_console->getOption('h');
// Load all sections from an existing config file, while skipping the extends.
$config = new Zend_Config_Ini(SMCONFIG_DIRECTORY . DIRECTORY_SEPARATOR . 'database.ini', null, array('skipExtends' => true, 'allowModifications' => true));
// Modify values
$config->database->doctrine_adapter = $zend_console->getOption('a');
$config->database->params->host = $zend_console->getOption('h');
$config->database->params->username = $zend_console->getOption('u');
$config->database->params->password = $zend_console->getOption('p');
$config->database->params->dbname = $zend_console->getOption('d');
$config->database->params->port = $zend_console->getOption('h');
$config->database->params->socket = $zend_console->getOption('h');
// Write the config file
$writer = new Zend_Config_Writer_Ini(array('config' => $config, 'filename' => 'config.ini'));
$writer->write();
//*/
} catch (Zend_Console_Getopt_Exception $e) {
fwrite(STDOUT, "Connection Failed\n");
echo $e->getUsageMessage();
exit;
}
}
示例3: postUpgrade
/** Post database upgrade. */
public function postUpgrade()
{
/** @var SettingModel $settingModel */
$settingModel = MidasLoader::loadModel('Setting');
$configPath = LOCAL_CONFIGS_PATH . DIRECTORY_SEPARATOR . $this->moduleName . '.local.ini';
if (file_exists($configPath)) {
$config = new Zend_Config_Ini($configPath, 'global');
$settingModel->setConfig(DICOMEXTRACTOR_DCM2XML_COMMAND_KEY, $config->get('dcm2xml', DICOMEXTRACTOR_DCM2XML_COMMAND_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(DICOMEXTRACTOR_DCMJ2PNM_COMMAND_KEY, $config->get('dcmj2pnm', DICOMEXTRACTOR_DCMJ2PNM_COMMAND_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(DICOMEXTRACTOR_DCMFTEST_COMMAND_KEY, $config->get('dcmftest', DICOMEXTRACTOR_DCMFTEST_COMMAND_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(DICOMEXTRACTOR_DCMDICTPATH_KEY, $config->get('dcmdictpath', DICOMEXTRACTOR_DCMDICTPATH_DEFAULT_VALUE), $this->moduleName);
$config = new Zend_Config_Ini($configPath, null, true);
unset($config->global->dcm2xml);
unset($config->global->dcmj2pnm);
unset($config->global->dcmftest);
unset($config->global->dcmdictpath);
$writer = new Zend_Config_Writer_Ini();
$writer->setConfig($config);
$writer->setFilename($configPath);
$writer->write();
} else {
$settingModel->setConfig(DICOMEXTRACTOR_DCM2XML_COMMAND_KEY, DICOMEXTRACTOR_DCM2XML_COMMAND_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(DICOMEXTRACTOR_DCMJ2PNM_COMMAND_KEY, DICOMEXTRACTOR_DCMJ2PNM_COMMAND_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(DICOMEXTRACTOR_DCMFTEST_COMMAND_KEY, DICOMEXTRACTOR_DCMFTEST_COMMAND_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(DICOMEXTRACTOR_DCMDICTPATH_KEY, DICOMEXTRACTOR_DCMDICTPATH_DEFAULT_VALUE, $this->moduleName);
}
}
示例4: postUpgrade
/** Post database upgrade. */
public function postUpgrade()
{
/** @var RandomComponent $randomComponent */
$randomComponent = MidasLoader::loadComponent('Random');
$securityKey = $randomComponent->generateString(32);
/** @var SettingModel $settingModel */
$settingModel = MidasLoader::loadModel('Setting');
$configPath = LOCAL_CONFIGS_PATH . DIRECTORY_SEPARATOR . $this->moduleName . '.local.ini';
if (file_exists($configPath)) {
$config = new Zend_Config_Ini($configPath, 'global');
$settingModel->setConfig(MIDAS_REMOTEPROCESSING_SECURITY_KEY_KEY, $config->get('securitykey', $securityKey), $this->moduleName);
$showButton = $config->get('showbutton');
if ($showButton === 'true') {
$showButton = 1;
} elseif ($showButton === 'false') {
$showButton = 0;
} else {
$showButton = MIDAS_REMOTEPROCESSING_SHOW_BUTTON_DEFAULT_VALUE;
}
$settingModel->setConfig(MIDAS_REMOTEPROCESSING_SHOW_BUTTON_KEY, $showButton, $this->moduleName);
$config = new Zend_Config_Ini($configPath, null, true);
unset($config->securitykey->securitykey);
unset($config->showbutton->showbutton);
$writer = new Zend_Config_Writer_Ini();
$writer->setConfig($config);
$writer->setFilename($configPath);
$writer->write();
} else {
$settingModel->setConfig(MIDAS_REMOTEPROCESSING_SECURITY_KEY_KEY, $securityKey, $this->moduleName);
$settingModel->setConfig(MIDAS_REMOTEPROCESSING_SHOW_BUTTON_KEY, MIDAS_REMOTEPROCESSING_SHOW_BUTTON_DEFAULT_VALUE, $this->moduleName);
}
}
示例5: indexAction
public function indexAction()
{
$registry = Zend_Registry::getInstance();
$translate = $registry->get("Zend_Translate");
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/manager.ini', null, true);
$validationErrors = array();
if ($this->getRequest()->isPost()) {
$c = $this->_getParam('config');
if (empty($c['manager_host'])) {
$validationErrors['manager_host'] = $translate->translate("Manager host is required");
}
if (empty($c['gateway_host'])) {
$validationErrors['gateway_host'] = $translate->translate("Gateway host is required");
}
if (empty($validationErrors)) {
$config->manager_host = $c['manager_host'];
$config->gateway_host = $c['gateway_host'];
$writer = new Zend_Config_Writer_Ini(array('config' => $config, 'filename' => APPLICATION_PATH . '/configs/manager.ini'));
$writer->write();
$this->view->flashMessage = $translate->translate("Preferences Updated");
}
}
$this->view->config = $config;
$this->view->validationErrors = $validationErrors;
}
示例6: postUpgrade
/** Post database upgrade. */
public function postUpgrade()
{
/** @var SettingModel $settingModel */
$settingModel = MidasLoader::loadModel('Setting');
$configPath = LOCAL_CONFIGS_PATH . DIRECTORY_SEPARATOR . $this->moduleName . '.local.ini';
if (file_exists($configPath)) {
$config = new Zend_Config_Ini($configPath, 'global');
$piwikUrl = isset($config->piwik->url) ? $config->piwik->url : STATISTICS_PIWIK_URL_DEFAULT_VALUE;
$settingModel->setConfig(STATISTICS_PIWIK_URL_KEY, $piwikUrl, $this->moduleName);
$piwikId = isset($config->piwik->id) ? $config->piwik->id : STATISTICS_PIWIK_SITE_ID_DEFAULT_VALUE;
$settingModel->setConfig(STATISTICS_PIWIK_SITE_ID_KEY, $piwikId, $this->moduleName);
$piwikApiKey = isset($config->piwik->apikey) ? $config->piwik->apikey : STATISTICS_PIWIK_API_KEY_DEFAULT_VALUE;
$settingModel->setConfig(STATISTICS_PIWIK_API_KEY_KEY, $piwikApiKey, $this->moduleName);
$ipInfoDbApiKey = isset($config->ipinfodb->apikey) ? $config->ipinfodb->apikey : STATISTICS_IP_INFO_DB_API_KEY_DEFAULT_VALUE;
$settingModel->setConfig(STATISTICS_IP_INFO_DB_API_KEY_KEY, $ipInfoDbApiKey, $this->moduleName);
$settingModel->setConfig(STATISTICS_SEND_DAILY_REPORTS_KEY, $config->get('report', STATISTICS_SEND_DAILY_REPORTS_DEFAULT_VALUE), $this->moduleName);
$config = new Zend_Config_Ini($configPath, null, true);
unset($config->global->piwik->url);
unset($config->global->piwik->id);
unset($config->global->piwik->pikey);
unset($config->global->ipinfodb->apikey);
unset($config->global->report);
$writer = new Zend_Config_Writer_Ini();
$writer->setConfig($config);
$writer->setFilename($configPath);
$writer->write();
} else {
$settingModel->setConfig(STATISTICS_PIWIK_URL_KEY, STATISTICS_PIWIK_URL_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(STATISTICS_PIWIK_SITE_ID_KEY, STATISTICS_PIWIK_SITE_ID_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(STATISTICS_PIWIK_API_KEY_KEY, STATISTICS_PIWIK_API_KEY_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(STATISTICS_IP_INFO_DB_API_KEY_KEY, STATISTICS_IP_INFO_DB_API_KEY_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(STATISTICS_SEND_DAILY_REPORTS_KEY, STATISTICS_SEND_DAILY_REPORTS_DEFAULT_VALUE, $this->moduleName);
}
}
示例7: postUpgrade
/** Post database upgrade. */
public function postUpgrade()
{
/** @var SettingModel $settingModel */
$settingModel = MidasLoader::loadModel('Setting');
$configPath = LOCAL_CONFIGS_PATH . DIRECTORY_SEPARATOR . $this->moduleName . '.local.ini';
if (file_exists($configPath)) {
$config = new Zend_Config_Ini($configPath, 'global');
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_PROVIDER_KEY, MIDAS_THUMBNAILCREATOR_PROVIDER_PHMAGICK, $this->moduleName);
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_FORMAT_KEY, MIDAS_THUMBNAILCREATOR_FORMAT_JPG, $this->moduleName);
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_KEY, $config->get('imagemagick', MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_USE_THUMBNAILER_KEY, $config->get('useThumbnailer', MIDAS_THUMBNAILCREATOR_USE_THUMBNAILER_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_THUMBNAILER_KEY, $config->get('thumbnailer', MIDAS_THUMBNAILCREATOR_THUMBNAILER_DEFAULT_VALUE), $this->moduleName);
$config = new Zend_Config_Ini($configPath, null, true);
unset($config->global->imageFormats);
unset($config->global->imagemagick);
unset($config->global->thumbnailer);
unset($config->global->useThumbnailer);
$writer = new Zend_Config_Writer_Ini();
$writer->setConfig($config);
$writer->setFilename($configPath);
$writer->write();
} else {
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_PROVIDER_KEY, MIDAS_THUMBNAILCREATOR_PROVIDER_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_FORMAT_KEY, MIDAS_THUMBNAILCREATOR_FORMAT_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_KEY, MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_USE_THUMBNAILER_KEY, MIDAS_THUMBNAILCREATOR_USE_THUMBNAILER_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_THUMBNAILCREATOR_THUMBNAILER_KEY, MIDAS_THUMBNAILCREATOR_THUMBNAILER_DEFAULT_VALUE, $this->moduleName);
}
}
示例8: create
/**
* @param string $type
*/
public function create()
{
/* @var $userConfig Zend_Tool_Framework_Client_Config */
$userConfig = $this->_registry->getConfig();
$resp = $this->_registry->getResponse();
if ($userConfig->exists()) {
require_once "Zend/Tool/Framework/Exception.php";
throw new Zend_Tool_Framework_Exception(
"A configuration already exists, cannot create a new one.");
}
$homeDirectory = $this->_detectHomeDirectory();
$writer = new Zend_Config_Writer_Ini();
$writer->setRenderWithoutSections();
$filename = $homeDirectory."/.zf.ini";
$config = array(
'php' => array(
'include_path' => get_include_path(),
),
);
$writer->write($filename, new Zend_Config($config));
$resp = $this->_registry->getResponse();
$resp->appendContent("Successfully written Zend Tool config.");
$resp->appendContent("It is located at: ".$filename);
}
示例9: _doInsert
protected function _doInsert(\Application\Entity\Entity $model)
{
$data = array("tax_free_allowance" => $model->taxFreeAllowance, "tax_percent" => $model->taxPercent, "incaso_parts" => $model->incasoParts, "storno_interval" => $model->stornoInterval, "storno_first_part_percent" => $model->stornoFirstPartPercent, "storno_second_part_percent" => $model->stornoSecondPartPercent);
$filename = APPLICATION_PATH . "/configs/configuration.ini";
$configWriter = new \Zend_Config_Writer_Ini();
$configWriter->write($filename, new \Zend_Config($data));
}
示例10: postUpgrade
/** Post database upgrade. */
public function postUpgrade()
{
/** @var SettingModel $settingModel */
$settingModel = MidasLoader::loadModel('Setting');
$config = new Zend_Config_Ini(APPLICATION_CONFIG, 'global');
$settingModel->setConfig('address_verification', $config->get('verifyemail', 0), 'mail');
if ($config->get('smtpfromaddress')) {
$fromAddress = $config->get('smtpfromaddress');
} elseif (ini_get('sendmail_from')) {
$fromAddress = ini_get('sendmail_from');
} else {
$fromAddress = 'no-reply@example.org';
// RFC2606
}
$settingModel->setConfig('from_address', $fromAddress, 'mail');
if ($config->get('smtpserver')) {
$components = parse_url($config->get('smtpserver'));
if (isset($components['host'])) {
$settingModel->setConfig('smtp_host', $components['host'], 'mail');
}
if (isset($components['port'])) {
$settingModel->setConfig('smtp_port', $components['port'], 'mail');
if ($components['port'] === 587) {
$settingModel->setConfig('smtp_use_ssl', 1, 'mail');
}
}
if (isset($components['user'])) {
$settingModel->setConfig('smtp_username', $components['user'], 'mail');
}
if (isset($components['pass'])) {
$settingModel->setConfig('smtp_password', $components['pass'], 'mail');
}
}
if ($config->get('smtpuser')) {
$settingModel->setConfig('smtp_username', $config->get('smtpuser'), 'mail');
}
if ($config->get('smtppassword')) {
$settingModel->setConfig('smtp_password', $config->get('smtppassword'), 'mail');
}
if ($settingModel->getValueByName('smtp_host', 'mail')) {
$provider = 'smtp';
} else {
$provider = 'mail';
}
$settingModel->setConfig('provider', $provider, 'mail');
/** @var UtilityComponent $utilityComponent */
$utilityComponent = MidasLoader::loadComponent('Utility');
$utilityComponent->installModule('mail');
$config = new Zend_Config_Ini(APPLICATION_CONFIG, null, true);
unset($config->global->smtpfromaddress);
unset($config->global->smtpserver);
unset($config->global->smtpuser);
unset($config->global->smtppassword);
unset($config->global->verifyemail);
$writer = new Zend_Config_Writer_Ini();
$writer->setConfig($config);
$writer->setFilename(APPLICATION_CONFIG);
$writer->write();
}
示例11: setIsInstalled
public static function setIsInstalled()
{
try {
$writer = new Zend_Config_Writer_Ini();
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/app.ini', null, array('skipExtends' => true, 'allowModifications' => true));
$config->production->isInstalled = "1";
$writer->setConfig($config)->setFilename(APPLICATION_PATH . '/configs/app.ini')->write();
return true;
} catch (Exception $e) {
return false;
}
}
示例12: saveConfig
public function saveConfig()
{
if (!is_dir(PIMCORE_PLUGINS_PATH . "/Zendformbuilder/data/form/")) {
mkdir(PIMCORE_PLUGINS_PATH . "/Zendformbuilder/data/form/");
}
if (file_exists(PIMCORE_PLUGINS_PATH . "/Zendformbuilder/data/form/form_" . $this->id . ".ini")) {
unlink(PIMCORE_PLUGINS_PATH . "/Zendformbuilder/data/form/form_" . $this->id . ".ini");
}
$config = new Zend_Config($this->config, true);
$writer = new Zend_Config_Writer_Ini(array("config" => $config, "filename" => PIMCORE_PLUGINS_PATH . "/Zendformbuilder/data/form/form_" . $this->id . ".ini"));
$writer->write();
}
示例13: myIndexAction
function myIndexAction()
{
if ($_SERVER['REQUEST_METHOD']) {
$form = new VF_Import_Settings();
$form->populate($_POST);
$config = $form->getConfig();
$config->importer->allowMissingFields = $form->getValue('allowMissingFields');
$config->importer->Y2KMode = $form->getValue('Y2KMode');
$config->importer->Y2KThreshold = $form->getValue('Y2KThreshold');
$writer = new Zend_Config_Writer_Ini(array('config' => $config, 'filename' => ELITE_CONFIG));
echo $writer->write();
}
}
示例14: myIndexAction
function myIndexAction()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$form = new Elite_Vaf_Model_Settings_Category();
$form->populate($_POST);
$config = $form->getConfig();
$config->category->disable = $form->getValue('disable');
$config->category->mode = $form->getValue('mode');
$config->category->whitelist = $form->getValue('whitelist');
$config->category->blacklist = $form->getValue('blacklist');
$config->category->requireVehicle = $form->getValue('requireVehicle');
$writer = new Zend_Config_Writer_Ini(array('config' => $config, 'filename' => ELITE_CONFIG));
echo $writer->write();
}
}
示例15: postUpgrade
/** Post database upgrade. */
public function postUpgrade()
{
/** @var SettingModel $settingModel */
$settingModel = MidasLoader::loadModel('Setting');
$configPath = LOCAL_CONFIGS_PATH . DIRECTORY_SEPARATOR . $this->moduleName . '.local.ini';
if (file_exists($configPath)) {
$config = new Zend_Config_Ini($configPath, 'global');
$settingModel->setConfig(MIDAS_DICOMSERVER_DCM2XML_COMMAND_KEY, $config->get('dcm2xml', MIDAS_DICOMSERVER_DCM2XML_COMMAND_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_STORESCP_COMMAND_KEY, $config->get('storescp', MIDAS_DICOMSERVER_STORESCP_COMMAND_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_STORESCP_PORT_KEY, $config->get('storescp_port', MIDAS_DICOMSERVER_STORESCP_PORT_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_STORESCP_STUDY_TIMEOUT_KEY, $config->get('storescp_study_timeout', MIDAS_DICOMSERVER_STORESCP_STUDY_TIMEOUT_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_RECEPTION_DIRECTORY_KEY, $config->get('receptiondir', MIDAS_DICOMSERVER_RECEPTION_DIRECTORY_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_DESTINATION_FOLDER_KEY, $config->get('pydas_dest_folder', MIDAS_DICOMSERVER_DESTINATION_FOLDER_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_DCMQRSCP_COMMAND_KEY, $config->get('dcmqrscp', MIDAS_DICOMSERVER_DCMQRSCP_COMMAND_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_DCMQRSCP_PORT_KEY, $config->get('dcmqrscp_port', MIDAS_DICOMSERVER_DCMQRSCP_PORT_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_DCMQRIDX_COMMAND_KEY, $config->get('dcmqridx', MIDAS_DICOMSERVER_DCMQRIDX_COMMAND_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_SERVER_AE_TITLE_KEY, $config->get('server_ae_title', MIDAS_DICOMSERVER_SERVER_AE_TITLE_DEFAULT_VALUE), $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_PEER_AES_KEY, $config->get('peer_aes', MIDAS_DICOMSERVER_PEER_AES_DEFAULT_VALUE), $this->moduleName);
$config = new Zend_Config_Ini($configPath, null, true);
unset($config->global->dcm2xml);
unset($config->global->storescp);
unset($config->global->storescp_port);
unset($config->global->storescp_study_timeout);
unset($config->global->receptiondir);
unset($config->global->pydas_dest_folder);
unset($config->global->dcmqrscp);
unset($config->global->dcmqrscp_port);
unset($config->global->dcmqridx);
unset($config->global->server_ae_title);
unset($config->global->peer_aes);
$writer = new Zend_Config_Writer_Ini();
$writer->setConfig($config);
$writer->setFilename($configPath);
$writer->write();
} else {
$settingModel->setConfig(MIDAS_DICOMSERVER_DCM2XML_COMMAND_KEY, MIDAS_DICOMSERVER_DCM2XML_COMMAND_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_STORESCP_COMMAND_KEY, MIDAS_DICOMSERVER_STORESCP_COMMAND_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_STORESCP_PORT_KEY, MIDAS_DICOMSERVER_STORESCP_PORT_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_STORESCP_STUDY_TIMEOUT_KEY, MIDAS_DICOMSERVER_STORESCP_STUDY_TIMEOUT_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_RECEPTION_DIRECTORY_KEY, MIDAS_DICOMSERVER_RECEPTION_DIRECTORY_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_DESTINATION_FOLDER_KEY, MIDAS_DICOMSERVER_DESTINATION_FOLDER_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_DCMQRSCP_COMMAND_KEY, MIDAS_DICOMSERVER_DCMQRSCP_COMMAND_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_DCMQRSCP_PORT_KEY, MIDAS_DICOMSERVER_DCMQRSCP_PORT_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_DCMQRIDX_COMMAND_KEY, MIDAS_DICOMSERVER_DCMQRIDX_COMMAND_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_SERVER_AE_TITLE_KEY, MIDAS_DICOMSERVER_SERVER_AE_TITLE_DEFAULT_VALUE, $this->moduleName);
$settingModel->setConfig(MIDAS_DICOMSERVER_PEER_AES_KEY, MIDAS_DICOMSERVER_PEER_AES_DEFAULT_VALUE, $this->moduleName);
}
}