Reorder and Added missing databases

This commit is contained in:
2023-02-28 23:41:51 -03:00
parent a326904825
commit 99344fda7d
17 changed files with 260 additions and 251 deletions

View File

@ -0,0 +1,65 @@
<?php
namespace ProVM\Implement;
use ProVM\Concept;
abstract class Database implements Concept\Database
{
protected string $host;
protected int $port;
protected string $name;
protected string $user;
protected string $password;
public function getHost(): string
{
return $this->host;
}
public function getPort(): int|bool
{
return $this->port ?? false;
}
public function getName(): string
{
return $this->name;
}
public function getUser(): string
{
return $this->user;
}
public function getPassword(): string
{
return $this->password;
}
public function setHost(string $host): Concept\Database
{
$this->host = $host;
return $this;
}
public function setPort(int $port): Concept\Database
{
$this->port = $port;
return $this;
}
public function setName(string $name): Concept\Database
{
$this->name = $name;
return $this;
}
public function setUser(string $username): Concept\Database
{
$this->user = $username;
return $this;
}
public function setPassword(string $password): Concept\Database
{
$this->password = $password;
return $this;
}
public function needsUser(): bool
{
return false;
}
}