public function putAction() { $account_dao = new AccountDao(); $account = array(); $account['id'] = $this->getRequest()->getParam('id'); $account['name'] = $this->getRequest()->getParam('name'); $account['description'] = $this->getRequest()->getParam('description'); $market_name = $this->getRequest()->getParam('market_name'); $account['account_group_id'] = $this->getRequest()->getParam('account_group_id'); $config_list = array(); $account_config_name_list = get_account_config_keys($market_name); foreach ($account_config_name_list as $account_config_name) { $config_list[] = array('account_id' => $account['id'], 'name' => $account_config_name, 'value' => $this->getRequest()->getParam("{$market_name}_{$account_config_name}")); } $account_config_dao = new AccountConfigDao(); foreach ($config_list as $config) { $account_config_dao->insert_update($config); } $account_dao->update($account); $this->redirect('/accounts'); }