Ejemplo n.º 1
0
 public function setConnection($host, $port, $socket, $database, $username, $password, $tablePrefix)
 {
     if ($socket) {
         throw new DatabaseConnectionException('PostgreSQL does not support socket connections');
     } else {
         parent::setPDOConnection($host, $port, $socket, $database, $username, $password, "pgsql:host={$host};port={$port};dbname={$database}");
     }
 }
Ejemplo n.º 2
0
 public function setConnection($host, $port, $socket, $database, $username, $password, $tablePrefix)
 {
     if ($socket) {
         parent::setPDOConnection($host, $port, $socket, $database, $username, $password, "mysql:unix_socket={$socket};dbname={$database};charset=UTF8");
     } else {
         parent::setPDOConnection($host, $port, $socket, $database, $username, $password, "mysql:host={$host};port={$port};dbname={$database};charset=UTF8");
     }
 }
 public function setConnection($host, $port, $socket, $database, $username, $password, $tablePrefix)
 {
     if ($socket) {
         parent::setPDOConnection($host, $port, $socket, $database, $username, $password, "sqlite:{$database}");
     } else {
         parent::setPDOConnection($host, $port, $socket, $database, $username, $password, "sqlite:{$database}");
     }
 }