Abstract
This commit is contained in:
58
src/Alias/Database.php
Normal file
58
src/Alias/Database.php
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
namespace ProVM\Alias;
|
||||||
|
|
||||||
|
use ProVM\Concept\Database as DatabaseInterface;
|
||||||
|
|
||||||
|
abstract class Database implements DatabaseInterface
|
||||||
|
{
|
||||||
|
protected string $host;
|
||||||
|
public function setHost(string $host): DatabaseInterface
|
||||||
|
{
|
||||||
|
$this->host = $host;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
public function getHost(): string
|
||||||
|
{
|
||||||
|
return $this->host;
|
||||||
|
}
|
||||||
|
protected int $port;
|
||||||
|
public function setPort(int $port): DatabaseInterface
|
||||||
|
{
|
||||||
|
$this->port = $port;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
public function getPort(): int
|
||||||
|
{
|
||||||
|
return $this->port;
|
||||||
|
}
|
||||||
|
protected string $name;
|
||||||
|
public function setName(string $name): DatabaseInterface
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
public function getName(): string
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
protected string $username;
|
||||||
|
public function setUsername(string $username): DatabaseInterface
|
||||||
|
{
|
||||||
|
$this->username = $username;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
public function getUsername(): string
|
||||||
|
{
|
||||||
|
return $this->username;
|
||||||
|
}
|
||||||
|
protected string $password;
|
||||||
|
public function setPassword(string $password): DatabaseInterface
|
||||||
|
{
|
||||||
|
$this->password = $password;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
public function getPassword(): string
|
||||||
|
{
|
||||||
|
return $this->password;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user