3
Using Laminas as a Library with Test-Driven Development
The next two chapters will prepare you to use Laminas. The preparation consists of three stages to allow you to gradually adapt to writing code in Laminas. In this chapter, we will go through the first stage, which we will explain using a simple example based on a reduced use case, showing it is possible to only use one Laminas component in an existing PHP application. We will initially use the laminas-db
component to abstract a database connection. In the next chapter, we will go through the other two stages.
You could hypothetically jump from the previous chapter to Chapter 5, Creating the Virtual Store Project, but it would be as though someone gave you a lightsaber without any training and told you to face Darth Vader in your first mission. Instead, let us keep calm and prepare ourselves properly for battle.
In this chapter, we’ll be covering the following topics:
- Understanding the software requirements...