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

8. Building a Dependency Injection Container

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

In the previous chapter, we built a really awesome ORM. With it, we can take our database work to a whole new level. It should give you lots to tinker with and think about.

In this chapter, we’re going to work on eliminating boilerplate and making it easier to share dependencies between different parts of our system.

During the Break…

Before we dive into building a dependency injection container, we’re going to review a few improvements I made to the website between chapters.

The biggest change was to switch the database library code ...

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.