Added doctrine support to database class