April 2016
Intermediate to advanced
290 pages
5h 51m
English
If we are creating services in our professional lives (without realizing it), then why don't we feel any difference in our codes?
This is because classes are the body of a service. Without their souls, they are simply another PHP object. Their soul is the concept that gives them birth by instantiating them only if they are needed.
The Dependency Injection Container (or Service Container) is such a concept. It manages the instantiation of services on demand. This means that the service container constructs and returns them once if they are requested. This utilizes memory and application performance in two ways: