setDriver() public method

public setDriver ( $driver )
Ejemplo n.º 1
0
 public function test_Should_SetAndGetDriver()
 {
     $dbSettingEntity = new DbSettingEntity();
     $dbSettingEntity->setDriver('mysql');
     $driver = $dbSettingEntity->getDriver();
     $this->assertEquals('mysql', $driver);
 }
Ejemplo n.º 2
0
 public function all()
 {
     $driver = $this->reader->getConfig('DB_DRIVER');
     $host = $this->reader->getConfig('DB_HOST');
     $database = $this->reader->getConfig('DB_DATABASE');
     $username = $this->reader->getConfig('DB_USERNAME');
     $password = $this->reader->getConfig('DB_PASSWORD');
     $dbSetting = new DbSettingEntity();
     $dbSetting->setDriver($driver)->setHost($host)->setDatabase($database)->setUsername($username)->setPassword($password);
     return $dbSetting;
 }