Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PHP Web Development with Laminas

You're reading from   PHP Web Development with Laminas Build a fully secured and functional e-commerce application with PHP using the Laminas framework

Arrow left icon
Product type Paperback
Published in Nov 2022
Publisher Packt
ISBN-13 9781803245362
Length 394 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Flavio Gomes da Silva Lisboa Flavio Gomes da Silva Lisboa
Author Profile Icon Flavio Gomes da Silva Lisboa
Flavio Gomes da Silva Lisboa
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

1. B18382_FM
2. B18382_TOC_ePub FREE CHAPTER
3. B18382_Preface
4. B18382_Part1
5. B18382_01
6. B18382_02
7. B18382_03
8. B18382_04
9. B18382_Part2
10. B18382_05
11. B18382_06
12. B18382_07
13. B18382_08
14. B18382_09
15. B18382_10
16. B18382_Part3
17. B18382_11
18. B18382_12
19. B18382_13
20. B18382_14
21. B18382_Index
22. B18382_BM

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 feeling as satisfied as Luke Skywalker did after exploding the Death Star!

In this chapter, we’ll be covering the following topics:

  • BDD with Behat
  • Creating models from user stories
  • Creating mappers from...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime