Esempio n. 1
0
 public function init()
 {
     parent::init();
     $this->createDefaultFiles();
     $values = Yii::app()->params['db_params'];
     if (isset($values['username'])) {
         $this->user = $values['username'];
     }
     if (isset($values['password'])) {
         $this->password = $values['password'];
     }
     if (isset($values['host'])) {
         $this->host = $values['host'];
     }
     if (isset($values['dbname'])) {
         $this->dbname = $values['dbname'];
     }
     if (isset($values['port'])) {
         $this->port = $values['port'];
     }
 }
Esempio n. 2
0
 public function init()
 {
     parent::init();
     $this->createDefaultFiles();
     $values = $this->getConfigFile('db_long_params');
     $this->user = $values['username'];
     $this->password = $values['password'];
     $this->host = $values['host'];
     $this->dbname = $values['dbname'];
     $this->port = $values['port'];
     $this->scenario = 'DBSYNC';
     $values = $this->getConfigFile('database_long_sync_config');
     $this->sync_id = $values['sync_id'];
     $this->sync_periodicity = $values['periodicity'];
     $this->sync_interval = $values['interval'];
     $this->sync_startTime = $values['startTime'];
     $this->sync_delete_periodicity = $values['delete_periodicity'];
     $this->sync_delete_period = $values['delete_period'];
     $this->sync_max_row = $values['max_row'];
     $values = $this->getConfigFile('install_db_long');
     $this->status = $values['install_database_long_status'];
 }