PHP web application with a DAO design pattern