© Christopher Pitt 2021
C. PittPro PHP 8 MVChttps://doi.org/10.1007/978-1-4842-6957-2_7

7. Building an Object-Relational Mapper Library

Christopher Pitt1  
Verbena Close 1, Stellenberg, Durbanville, Cape Town, South Africa

In the previous chapter, we built a solid foundation for database work. We have a driver-based database library, through which we can execute SQL queries in an engine-agnostic way.

In this chapter, we’re going to take things even further. We’re going to build an Object-Relational Mapper (or ORM) library, to represent database rows and tables as PHP objects.

We’ve built enough of our framework, and Whoosh! website, that there are a bunch improvements we could be making to the website design and functionality. Instead of taking ...

Get Pro PHP 8 MVC: Model View Controller Architecture-Driven Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.