Scalr_Db_Msr_Info::__construct PHP Method

__construct() public method

public __construct ( DBFarmRole $dbFarmRole, DBServer $dbServer, $type = null )
$dbFarmRole DBFarmRole
$dbServer DBServer
    public function __construct(DBFarmRole $dbFarmRole, DBServer $dbServer, $type = null)
    {
        $this->dbFarmRole = $dbFarmRole;
        $this->dbServer = $dbServer;
        $this->logger = \Scalr::getContainer()->logger(__CLASS__);
        $this->replicationMaster = (int) $dbServer->GetProperty(Scalr_Db_Msr::REPLICATION_MASTER);
        $this->buildStorageSettings();
    }

Usage Example

Example #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);
 }
All Usage Examples Of Scalr_Db_Msr_Info::__construct