The data access layer will consist of a User DAO class to provide database abstraction and an abstract Base DAO class to provide abstract methods, which is required for the User DAO class to be implemented. Also, we will create the abstract class to provide abstract methods for DAO classes to be created in our future projects. Note that we will use PHP namespace,
My\Dao, for the data access layer classes.
The abstract class will be used to provide a basic framework for subclasses to implement methods. Simply, the basic database operations are
create, read, update, and
delete. So, the abstract class will provide these types of abstract methods along with methods that will ...