Reorder and Added missing databases
This commit is contained in:
65
src/Implement/Database.php
Normal file
65
src/Implement/Database.php
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user