Database appears to be singleton, but it's possible to freely create instances of Database via public constructor.
IconnectionInfo provides getConnection() which returns a PDO object but Database also provides getSelectQueryResult()-method for results.
So it seems there's one responsibility too much. Do you want to provide users with database connections or get them results from the database? (Also, i think you should move the code from the constructor inside getConnection().)
Whichever responsibility you choose, i feel it would be more beneficial to provide a Database interface. This interface could be implemented by classes like PostgreSQLDatabase, MySQLDatabase, SQLiteDatabase etc. These implementations could take connection information as arguments because hard coding them is a bad practice.
Interfaces shouldn't be used as configuration. They should have no direct effect on the implementations internals.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Database appears to be singleton, but it's possible to freely create instances of Database via public constructor.
IconnectionInfo provides getConnection() which returns a PDO object but Database also provides getSelectQueryResult()-method for results.
So it seems there's one responsibility too much. Do you want to provide users with database connections or get them results from the database? (Also, i think you should move the code from the constructor inside getConnection().)
Whichever responsibility you choose, i feel it would be more beneficial to provide a Database interface. This interface could be implemented by classes like PostgreSQLDatabase, MySQLDatabase, SQLiteDatabase etc. These implementations could take connection information as arguments because hard coding them is a bad practice.
Interfaces shouldn't be used as configuration. They should have no direct effect on the implementations internals.