mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-08 23:18:16 +02:00
37 lines
623 B
PHP
37 lines
623 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Structural\DependencyInjection;
|
|
|
|
class DatabaseConfiguration
|
|
{
|
|
public function __construct(
|
|
private string $host,
|
|
private int $port,
|
|
private string $username,
|
|
private string $password
|
|
) {
|
|
}
|
|
|
|
public function getHost(): string
|
|
{
|
|
return $this->host;
|
|
}
|
|
|
|
public function getPort(): int
|
|
{
|
|
return $this->port;
|
|
}
|
|
|
|
public function getUsername(): string
|
|
{
|
|
return $this->username;
|
|
}
|
|
|
|
public function getPassword(): string
|
|
{
|
|
return $this->password;
|
|
}
|
|
}
|