database not extending PDO and encapsulated models