6
Models and Object-Relational Mappers with Behavior-Driven Development
In this chapter, we will use laminas-db to map an entity-relationship model to an object model. Instead of just implementing mappers with Laminas, we will also create a most powerful reusable mapper extending Laminas classes. Finally, we will show how models and mappers are connected. Along with the creation of the classes, we will use the approach of behavior-driven development (BDD) to keep user-readable requirements in our source code.
By the end of this chapter, you will have learned how to create models and object-relational mapper classes using the approach of BDD. You will know how to map system requirements to code in a well-organized way. I hope you finish the chapter ...
Get PHP Web Development with Laminas 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.