From the course: PHP: Object-Oriented Programming with Databases

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Create inheritable code

Create inheritable code

- [Narrator] We have successfully been able to implement the active record design pattern on our bicycle class. Our bicycle class is able to create, read, update, and delete records in the database. So it allows us to work with those database records in an object oriented way. That's what the active record design pattern is all about. In the next chapter we're going to start working with user authentication. And we're going to want to have a table of the admin users, so the store their username and password, and know who's able to log in. We're also going to want to have a content management system for those, so that we have the ability to create, read updated and delete our admin users. So we could take all of the code we just worked on, in our bicycle class, we could take it and copy it, and paste it into an admin class, so we'd have that same behavior there. And then if our application gets more robust and the start…

Contents