__construct() public méthode

public __construct ( DBFarmRole $dbFarmRole, DBServer $dbServer, $type = null )
$dbFarmRole DBFarmRole
$dbServer DBServer
Exemple #1
0
 public function __construct(DBFarmRole $dbFarmRole, DBServer $dbServer)
 {
     $this->databaseType = Scalr_Db_Msr::DB_TYPE_REDIS;
     parent::__construct($dbFarmRole, $dbServer);
     $this->masterPassword = $dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::MASTER_PASSWORD);
     $this->persistenceType = $dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::PERSISTENCE_TYPE);
 }
Exemple #2
0
 public function __construct(DBFarmRole $dbFarmRole, DBServer $dbServer, $type = null)
 {
     $this->databaseType = $type ? $type : ROLE_BEHAVIORS::MYSQL2;
     parent::__construct($dbFarmRole, $dbServer);
     $this->rootPassword = $dbFarmRole->GetSetting(Scalr_Db_Msr_Mysql2::ROOT_PASSWORD);
     $this->replPassword = $dbFarmRole->GetSetting(Scalr_Db_Msr_Mysql2::REPL_PASSWORD);
     $this->statPassword = $dbFarmRole->GetSetting(Scalr_Db_Msr_Mysql2::STAT_PASSWORD);
     $this->logPos = $dbFarmRole->GetSetting(Scalr_Db_Msr_Mysql2::LOG_POS);
     $this->logFile = $dbFarmRole->GetSetting(Scalr_Db_Msr_Mysql2::LOG_FILE);
 }
Exemple #3
0
 public function __construct(DBFarmRole $dbFarmRole, DBServer $dbServer)
 {
     $this->databaseType = Scalr_Db_Msr::DB_TYPE_POSTGRESQL;
     parent::__construct($dbFarmRole, $dbServer);
     $this->rootUser = $dbFarmRole->GetSetting(Scalr_Db_Msr_Postgresql::ROOT_USERNAME);
     $this->rootPassword = $dbFarmRole->GetSetting(Scalr_Db_Msr_Postgresql::ROOT_PASSWORD);
     $this->rootSshPrivateKey = $dbFarmRole->GetSetting(Scalr_Db_Msr_Postgresql::ROOT_SSH_PRIV_KEY);
     $this->rootSshPublicKey = $dbFarmRole->GetSetting(Scalr_Db_Msr_Postgresql::ROOT_SSH_PUB_KEY);
     $this->currentXlogLocation = $dbFarmRole->GetSetting(Scalr_Db_Msr_Postgresql::XLOG_LOCATION);
 }
Exemple #4
0
 public function __construct(DBFarmRole $dbFarmRole, DBServer $dbServer)
 {
     $this->databaseType = Scalr_Db_Msr::DB_TYPE_REDIS;
     parent::__construct($dbFarmRole, $dbServer);
     $this->masterPassword = $dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::MASTER_PASSWORD);
     $this->persistenceType = $dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::PERSISTENCE_TYPE);
     $this->usePassword = $dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::USE_PASSWORD);
     $this->numProcesses = $dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::NUM_PROCESSES);
     if (!$this->numProcesses) {
         $this->numProcesses = 1;
     }
     if ($dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::PORTS_ARRAY)) {
         $this->ports = @json_decode($dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::PORTS_ARRAY));
     }
     if ($dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::PASSWD_ARRAY)) {
         $this->passwords = @json_decode($dbFarmRole->GetSetting(Scalr_Db_Msr_Redis::PASSWD_ARRAY));
     }
     if (!$this->ports && $this->masterPassword) {
         $this->ports = array(6379);
         $this->passwords = array($this->masterPassword);
     }
 }