PDO objects across classes
问题 I'm looking for some feedback on the following: I currently have two classes, which are being used in my PHP application. A database connection class, which is currently using MySQL (but switching to PDO ). Another class (with several functions) which requires database functionality. I'm looking for the best way to design this, I've read up on singletons (with very mixed reviews), read examples where objects were simply declared as new for each method (class functions), and examples where the