Files
OMS/app/omeauto/lib/config/setting.php
2025-12-28 23:13:25 +08:00

55 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
/**
* 自动确认设置
*
* @author hzjsq@msn.com
* @version 0.1b
*/
class omeauto_config_setting {
/**
*
*/
public function saveAutoCnf($cnf) {
$cnfString = serialize($cnf);
app::get('omeauto')->setConf('auto.setting', $cnfString);
}
/**
* 获得当前设置内容
*
* @param void
* @return Array
*/
function getAutoCnf() {
$autoCnf = app::get('ome')->getConf('auto.setting');
if (empty($autoCnf)) {
return $this->_defaultAutoCnf();
} else {
if (!is_array($autoCnf) || empty($autoCnf)) {
return $this->_defaultAutoCnf();
} else {
return $autoCnf;
}
}
}
/**
* 获取缺省设置
*
* @param void
* @return Array
*/
private function _defaultAutoCnf() {
return array('bufferTime' => '30', 'autoCod' => 'N', 'chkNoPayOrder' => 'Y', 'chkMemo' => 'Y', 'chkCustom' => 'Y', 'chkProduct' => 'N', 'autoDelivery' => 'Y', 'combineMember' => 'N', 'chkShipAddress' => 'N');
}
}