public function __construct() { $opt = Arch_Yaml::get('prize/soap', 'link', true); if (!(!empty($opt['url']) && fopen($opt['url'], 'r'))) { $opt['url'] = 'http://www.xabaili.com/points/server.php'; } $this->client = new nusoap_client($opt['url']); }
private static function getOpt($name) { $opt = Arch_Yaml::get('db', $name, true); if (empty($opt)) { throw new Arch_Exception("db.{$name} is empty"); } return $opt; }
private function getConf() { $conf = Arch_Yaml::get('pay', $this->module); if (empty($conf)) { throw new Blue_Exception_Warning("配置PAY-{$this->module}不存在"); } return $conf; }
public function __construct() { if (Arch_Yaml::isExist('arch', 'id')) { $this->opt = Arch_Yaml::get('arch', 'id'); } else { $this->opt = Core_Conf::getConf('arch:id'); } $this->db = Blue_DB::instance($this->opt['db']); }
private static function getOpt($name) { //$opt = Core_Conf::getConf('db:' . $name); $opt = Arch_Yaml::get('db', $name, true); if (empty($opt)) { throw new Blue_Exception_Fatal("db.{$name} is empty"); } return $opt; }
private static function getConf() { if (Arch_Yaml::isExist('blue')) { $ini = Arch_Yaml::get('blue', 'passport'); } else { $ini = Core_Conf::getConf('blue:passport'); } if (empty($ini)) { throw new Blue_Exception_Fatal("配置blue.ini=>passport不存在"); } return $ini; }
public function __construct($module) { $ini = Arch_Yaml::get('opensearch', $module, true); if (empty($ini)) { throw new Arch_Exception('opensearch配置文件不存在'); } $this->module = $ini['module']; $this->ak = $ini['ak']; $this->sk = $ini['sk']; $this->host = $ini['host']; $this->ins = new CloudsearchClient($this->ak, $this->sk, array('host' => $this->host), 'aliyun'); }
private function __construct($ins) { $this->ins = new Memcached(); try { $ini = Arch_Yaml::get('mc', $ins, true); } catch (Core_Exception $e) { $ini = Core_Conf::getConf('memcache:' . $ins); } $this->ins->addServer($ini['host'], $ini['port']); $this->ins->setOption(Memcached::OPT_BINARY_PROTOCOL, true); //$this->ins->setSaslAuthData('53359429868211e4', 'd1ef_6f86'); }
public static function getInstance($ini) { if (Arch_Yaml::get('oss', $ini, true)) { $conf = Arch_Yaml::get('oss', $ini, true); } else { $conf = Core_Conf::getConf('oss:' . $ini); } if (empty($conf)) { throw new Blue_Exception_Fatal("Conf oss:{$ini} is empty"); } return new Arch_Oss($conf['ak'], $conf['sk'], $conf['host'], $conf['bucket'], $conf['ns'], $conf['cdn']); }
protected function needPrivileges() { $sess = $this->getLogined(); //表示 拥有所有权限 if (intval($sess['adminInfo']['isrestricted']) == 0) { $this->_privileges = Arch_Yaml::get('privileges'); } else { $privileges = $this->sManager->getAdminManagerById($sess['adminInfo']['adminId']); $this->_privileges = @unserialize($privileges['admin_privilege']); } if (isset($this->_privileges[$this->pageModule])) { $this->privileges = $this->_privileges[$this->pageModule]; } }
private function loadConf() { $conf = Arch_Yaml::get('smarty', null, true); return $conf; }
/** * 初始化并进行链接 * * @param string $type 类型 * * @return Arch_Pop Object */ public static function instance($type) { $ini = Arch_Yaml::get('pop3', $type); return new Arch_Pop($ini['host'], $ini['port'], $ini['connect_timeout'], $ini['read_timeout']); }
/** * 初始化Mod的配置文件 * * @param string $mod */ private function _initConf($mod) { $ini = Arch_Yaml::get('paf', $mod, true); if (empty($ini)) { throw new Arch_Exception("Need paf.yaml"); } $this->ip = $ini['ip']; $this->port = $ini['port']; $this->cto = $ini['conn_timeout']; $this->rto = $ini['read_timeout']; $this->topic = $ini['topic']; }
public function __construct($module) { $opt = Arch_Yaml::get('stat', $module, true); $this->os = new Arch_OpenSearch($opt['opensearch']); }
public function __construct() { $opt = Arch_Yaml::get('prize/blue', 'search', true); $opts = array('host' => $opt['host']); $this->client = new CloudsearchClient($opt['access'], $opt['secret'], $opts, $opt['type']); }
private function getConf($module) { $conf = Arch_Yaml::get('getui', 'modules', true); if (is_array($conf) && isset($conf[$module])) { return $conf[$module]; } throw new Arch_Exception("Getui conf {$module} is not exist"); }