Video Lesson: Dependency injection with Object Manager in Magento

Dependency injection with Object Manager in Magento

This is premium content

Only available to enrolled or University students.
Join today to unlock all lessons in this course.

Dependency injection with Object Manager in Magento

Learn dependency injection in Magento Object Manager for flexible PHP class creation and powerful extensibility.

Lesson Content

Before continuing, let’s take a step back for a moment. If you aren’t familiar with dependency injection, or DI, here’s a brief summary.

Dependency injection is a more structured way to create objects. Rather than using the new keyword to create objects, the classes which you’d like to create objects from are passed into your class’s constructor. In PHP, this is the __construct function.

When code in this class is executed, the classes we passed into the constructor...

Premium content

Enroll to unlock the full content and all course materials.

Maggie

Hey, I'm Maggie! 👋

Ask me anything.

Want to chat with Maggie?

Enroll in this course for AI tutor access.

Comments

Join the discussion!

Comments

Want to comment on this lesson?

Enroll in this course to leave comments.