| 1 | <?php |
||
| 10 | class ConnectionConfiguration |
||
| 11 | { |
||
| 12 | /** @var string */ |
||
| 13 | private $host; |
||
| 14 | /** @var int */ |
||
| 15 | private $port; |
||
| 16 | /** @var string */ |
||
| 17 | private $username; |
||
| 18 | /** @var string */ |
||
| 19 | private $password; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * ConnectionConfiguration constructor. |
||
| 23 | * |
||
| 24 | * @param string $host |
||
| 25 | * @param int $port |
||
| 26 | * @param string $username |
||
| 27 | * @param string $password |
||
| 28 | */ |
||
| 29 | 4 | public function __construct(string $host, int $port, string $username = '', string $password = '') |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 2 | public function getHost(): string |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return int |
||
| 47 | */ |
||
| 48 | 2 | public function getPort(): int |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | 2 | public function getUsername(): string |
|
| 60 | |||
| 61 | /** |
||
| 62 | * @return bool |
||
| 63 | */ |
||
| 64 | 4 | public function hasCredentials(): bool |
|
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | 2 | public function getPassword(): string |
|
| 76 | |||
| 77 | /** |
||
| 78 | * @return string |
||
| 79 | */ |
||
| 80 | 4 | public function getConnectionUri(): string |
|
| 95 | } |
||
| 96 |