September 2018
Beginner to intermediate
218 pages
4h 27m
English
Dependency injection has become a de facto standard of modern-day software. Magento makes heavy use of this technique, based on mappings found in di.xml files. The workload of Magento's dependency injection is handled by the Magento\Framework\ObjectManager\ObjectManager instance, which implements the lightweight Magento\Framework\ObjectManagerInterface.
The di.xml file configures the object manager, telling it how to handle the following:
These features allow for a great degree of flexibility and extensibility, as we will soon see.
Every module can have a global and area-specific di.xml file.
Magento loads configuration files in the following order:
Read now
Unlock full access