dsn = "mysql:host=".$_ENV["HOST"].";dbname=".$_ENV["DATABASE"].";charset=UTF8"; $this->login = $_ENV["USER"]; $this->password = $_ENV["PASSWORD"]; } function connect(): int|Connection { try { echo " "; $connection = new Connection($this->dsn,$this->login,$this->password); }catch (PDOException $e){ throw new PDOException($e->getMessage(), $e->getCode(), $e); } return $connection; } }