Class to connect PHP with different types of databases