Пример #1
0
 /**
  * @param Entity $entity
  *
  * @return PDOStatement
  */
 protected function updateEntity(Entity $entity)
 {
     $table = $this->getTable($entity);
     $keyValueData = $this->getKeyValuePropertiesByEntity($entity);
     $where = null;
     return $this->pdoAdapter->update($table, $keyValueData, $where);
 }
Пример #2
0
 public function __construct($game_cfg)
 {
     $db_server = $game_cfg["db_host"];
     $db_user = $game_cfg["db_user"];
     $db_pass = $game_cfg["db_pass"];
     $db_name = $game_cfg["db_name"];
     parent::__construct($db_server, $db_user, $db_pass, $db_name);
 }
Пример #3
0
 public function __construct()
 {
     $cfg = get_dau_cfg();
     $db_server = $cfg["db_host"];
     $db_user = $cfg["db_user"];
     $db_pass = $cfg["db_pass"];
     $db_name = $cfg["db_name"];
     parent::__construct($db_server, $db_user, $db_pass, $db_name);
 }
Пример #4
0
 function __construct($server_cfg, $game_cfg)
 {
     $db_server = $game_cfg["db_host"];
     $db_user = $game_cfg["rpt_user"];
     $db_pass = $game_cfg["rpt_pass"];
     $db_name = $game_cfg["db_name"];
     parent::__construct($db_server, $db_user, $db_pass, $db_name);
     $this->game_cfg = $game_cfg;
     $this->server_cfg = $server_cfg;
 }
Пример #5
0
 public function __construct($server_cfg, $game_cfg)
 {
     $rs_conf_file = $server_cfg['rs_conf_file'];
     $game_db_conf = get_rs_db_conf($rs_conf_file);
     $db_host = $game_db_conf['db_host'];
     $db_name = 'rightscale';
     $db_user = $game_db_conf['db_user'];
     $db_pass = $game_db_conf['db_pass'];
     parent::__construct($db_host, $db_user, $db_pass, $db_name);
 }
Пример #6
0
 function __construct($server_cfg)
 {
     $conf = get_rs_config($server_cfg["rs_conf_file"]);
     $db_server = $conf["host"];
     $db_user = $conf["user"];
     $db_pass = $conf["password"];
     $db_name = $conf["database"];
     parent::__construct($db_server, $db_user, $db_pass, $db_name);
     $this->server_cfg = $server_cfg;
 }
Пример #7
0
 public function __construct($server_cfg)
 {
     $this->server_cfg = $server_cfg;
     $this->rs_cfg = $this->get_rs_ini($server_cfg['rs_conf_file']);
     $db_host = $this->rs_cfg['DB']['host'];
     $db_user = $this->rs_cfg['DB']['user'];
     $db_pass = $this->rs_cfg['DB']['password'];
     $db_name = $this->rs_cfg['DB']['database'];
     parent::__construct($db_host, $db_user, $db_pass, $db_name);
 }
Пример #8
0
 public function __construct($table = null)
 {
     //db connector config
     $this->_dbUse = 'master';
     $this->_dbConfigs = (require "../utils/MysqlConfig.php");
     //PDOAdapter config
     $this->_prefix = $this->_dbConfigs[$this->_dbUse]["db_table_pre"];
     $this->_debug = $this->_dbConfigs[$this->_dbUse]["db_debug"];
     $this->_fetchType = PDO::FETCH_OBJ;
     // get db connection manager
     $this->_connector = MyPDOConnector::getInstance()->loadConfigs($this->_dbConfigs);
     $this->_cacher = MyPDOCacher::getInstance();
     parent::__construct($table);
 }
Пример #9
0
 public function __construct($table = null)
 {
     //db connector config
     $this->_dbUse = Slim::getInstance()->config('database')['default'];
     $this->_dbConfigs = Slim::getInstance()->config('database')['connections'];
     //PDOAdapter config
     $this->_prefix = $this->_dbConfigs[$this->_dbUse]["prefix"];
     $this->_debug = $this->_dbConfigs[$this->_dbUse]["true"];
     $this->_fetchType = PDO::FETCH_ASSOC;
     // get db connection manager
     $this->_connector = MyPDOConnector::getInstance()->loadConfigs($this->_dbConfigs);
     $this->_cacher = MyPDOCacher::getInstance();
     parent::__construct($table);
 }
Пример #10
0
 public function __construct($server_cfg, $game, $slack_now = false)
 {
     $cfg = get_eu_cfg($server_cfg['eu_conf_file']);
     $db_server = $cfg["db_host"];
     $db_user = $cfg["db_user"];
     $db_pass = $cfg["db_pass"];
     $db_name = $cfg["db_name"];
     $this->table = $cfg["table"];
     $this->game = $game;
     $this->game_cfg = load_game_config($game);
     $this->server_cfg = $server_cfg;
     parent::__construct($db_server, $db_user, $db_pass, $db_name);
     $this->max_metric = $this->get_max_metric($slack_now);
     $this->rs = new Rightscale($server_cfg, $game);
 }
Пример #11
0
 public function __construct($server_cfg, $game)
 {
     $cfg = get_rs_config($server_cfg['rs_conf_file']);
     $db_server = $cfg["db_host"];
     $db_user = $cfg["db_user"];
     $db_pass = $cfg["db_pass"];
     $db_name = $cfg["db_name"];
     $this->server_cfg = $server_cfg;
     $this->game = $game;
     parent::__construct($db_server, $db_user, $db_pass, $db_name);
     $this->ip_list = array();
     // Query rightscale DB to get array wise IPs for 'game'
     $this->get_ips();
     // Apply selection criteria and find profiling candidate IPs
     $this->balance_ips();
 }
Пример #12
0
 public function __construct($game_cfg)
 {
     $game_db_conf = get_game_db_conf($game_cfg);
     $db_host = $game_db_conf['db_host'];
     $db_name = $game_db_conf['db_name'];
     $db_user = $game_db_conf['db_user'];
     $db_pass = $game_db_conf['db_pass'];
     parent::__construct($db_host, $db_user, $db_pass, $db_name);
 }