private function connect(string $dsn): void
    {
        $this->pdo = new PDO($dsn, $this->username, $this->password, $this->connectionOptions);
        $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

        $this->driver = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME);
    }
private function connect(string $dsn): void
    {
        $this->pdo = new PDO($dsn, $this->username, $this->password, $this->connectionOptions);
        $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

        $this->driver = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME);
    }
private function connect ( string $ dsn ) : void { $ this -> pdo = new PDO ( $ dsn , $ this -> username , $ this -> password , $ this -> connectionOptions ) ; $ this -> pdo -> setAttribute ( PDO :: ATTR_ERRMODE , PDO :: ERRMODE_EXCEPTION ) ; $ this -> driver = $ this -> pdo -> getAttribute ( PDO :: ATTR_DRIVER_NAME ) ; }
Lazy-connects to the database.

@param string $dsn DSN string

@return void
Lazy - connects to the database .