Develop your own framework-- (2) encapsulation of database tool classes
In order to separate the content of the framework from the data, we encapsulate the commonly used classes into a utility class, and when these methods are used, the encapsulated class is called, which can greatly improve the reusability of the code.
First of all, encapsulate the database-related operations, in order to standardize the encapsulation, we create an interface for the database to implement the methods in the interface, and the database uses PDO extensions to access the data.
Database interface class
I_DAO.interface.php