host; } } public string $username = 'root' { get { return $this->username; } } public string $password = '' { get { return $this->password; } } public string $database = 'opm_ectms' { get { return $this->database; } } public function __construct() { $this->host = getenv('DB_HOST'); $this->username = getenv('DB_USER'); $this->password = getenv('DB_PASSWORD'); $this->database = getenv('DB_NAME'); } /** * @param $connection string|null * @return Connection */ public function getConnection(?string $connection = null): Connection { return Db::connection($connection); } }