mirror of
https://github.com/danog/sql.git
synced 2024-11-30 04:29:18 +01:00
Remove ConnectionConfig::getConnectionString()
This commit is contained in:
parent
37d947b422
commit
130bcb5c10
@ -66,28 +66,6 @@ abstract class ConnectionConfig
|
||||
$this->database = $database;
|
||||
}
|
||||
|
||||
public function getConnectionString(): string
|
||||
{
|
||||
$chunks = [
|
||||
"host=" . $this->host,
|
||||
"port=" . $this->port,
|
||||
];
|
||||
|
||||
if ($this->user !== null) {
|
||||
$chunks[] = "user=" . $this->user;
|
||||
}
|
||||
|
||||
if ($this->password !== null) {
|
||||
$chunks[] = "password=" . $this->password;
|
||||
}
|
||||
|
||||
if ($this->database !== null) {
|
||||
$chunks[] = "db=" . $this->database;
|
||||
}
|
||||
|
||||
return \implode(" ", $chunks);
|
||||
}
|
||||
|
||||
final public function getHost(): string
|
||||
{
|
||||
return $this->host;
|
||||
|
Loading…
Reference in New Issue
Block a user