PHP application with the DAO design pattern