Remove ConnectionConfig::getConnectionString()
This commit is contained in:
parent
37d947b422
commit
130bcb5c10
@ -66,28 +66,6 @@ abstract class ConnectionConfig
|
|||||||
$this->database = $database;
|
$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
|
final public function getHost(): string
|
||||||
{
|
{
|
||||||
return $this->host;
|
return $this->host;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user