コード例 #1
0
ファイル: Redis.php プロジェクト: xjlelf/php_test
 public function __CONSTRUCT($con_name = null)
 {
     if (empty($con_name)) {
         $con_name = self::$con_name;
     }
     $this->config = \Lib\Config::load('Redis')->{$con_name};
     $this->connect($this->config['host'], $this->config['port']);
 }
コード例 #2
0
	public function viewCreate($params)
	{

		$strings = Config::load('guildTranslations', 'translations/guild');
		foreach ($strings as $key => $str) {
			Request::getInstance()->setParam('txt.' . $key, _($str));
		}
		Request::getInstance()->setParam('txt.enter_guild_name', _('alliance.enter_guild_name'));
		Request::getInstance()->setParam('txt.create', _('common.create'));

		$params['isLocked'] = getHero()->getLevel() < 15 ? true : false;

		return $params;
	}
コード例 #3
0
ファイル: Memcache.php プロジェクト: xjlelf/php_test
 private function __CONSTRUCT($con_name)
 {
     $this->config = \Lib\Config::load('Memcache')->{$con_name};
     $this->connect($this->config['host'], $this->config['port']);
 }
コード例 #4
0
ファイル: Database.php プロジェクト: xjlelf/php_test
 protected function __CONSTRUCT($database)
 {
     $this->database = $database;
     $this->config = \Lib\Config::load('Mysql')->{$database};
 }