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']); }
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; }
private function __CONSTRUCT($con_name) { $this->config = \Lib\Config::load('Memcache')->{$con_name}; $this->connect($this->config['host'], $this->config['port']); }
protected function __CONSTRUCT($database) { $this->database = $database; $this->config = \Lib\Config::load('Mysql')->{$database}; }