<?php
final class Database
{
    private string $host = 'localhost';
    private string $dbname = 'gladystech_novax_marketplace';
    private string $username = 'gladystech_novax';
    private string $password = 'JI,uUk(oo*CBH5^Q';
    public function connect(): PDO
    {
        $dsn = "mysql:host={$this->host};dbname={$this->dbname};charset=utf8mb4";
        return new PDO($dsn, $this->username, $this->password, [
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
            PDO::ATTR_EMULATE_PREPARES => false,
        ]);
    }
}
